Used for logging into the browser using a device wallet. Called from the browser, bearer token is received from the stream response once authentication is successful via the wallet.
rpc CreateAuthnBrowserWithWalletChallenge
CreateAuthnBrowserWithWalletChallenge
user_api.v1.CreateAuthnBrowserWithWalletChallenge
user_api.v1.CreateAuthnBrowserWithWalletChallenge
Used for logging into the browser using a device wallet. Called from the browser, bearer token is received from the stream response once authentication is successful via the wallet.
requests CreateAuthnBrowserWithWalletChallengeRequest
CreateAuthnBrowserWithWalletChallengeRequest
user_api.v1.CreateAuthnBrowserWithWalletChallengeRequest
user_api.v1.CreateAuthnBrowserWithWalletChallengeRequest
stream, _ := userApiService.CreateAuthnBrowserWithWalletChallenge(ctx, &v1.CreateAuthnBrowserWithWalletChallengeRequest{})
resp, _ := stream.Recv()
fmt.Println(resp)
const createauthnbrowserwithwalletchallengerequest = new CreateAuthnBrowserWithWalletChallengeRequest();
const stream = service.createAuthnBrowserWithWalletChallenge(createauthnbrowserwithwalletchallengerequest)
stream.on("data", (value:CreateAuthnBrowserWithWalletChallengeResponse|null) => {
console.log("received ", value);
})
using System;
using Grpc.Core;
using System.Threading.Tasks;
using UserApi.V1;
namespace main
{
class Program
{
static void Main(string[] args)
{
Channel channel = new Channel("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure);
var client = new UserApiService.UserApiServiceClient(channel);
var headers = new Metadata();
var createAuthnBrowserWithWalletChallengeRequest = new CreateAuthnBrowserWithWalletChallengeRequest{};
using(var call = client.CreateAuthnBrowserWithWalletChallenge(createAuthnBrowserWithWalletChallengeRequest, headers))
{
var responseReaderTask = Task.Run(async () =>
{
while (await call.ResponseStream.MoveNext())
{
Console.WriteLine("Response: " + call.ResponseStream.Current);
}
});
responseReaderTask.Wait();
}
channel.ShutdownAsync().Wait();
}
}
}
package demo;
import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import java.util.Iterator;
import user_api.v1.User.CreateAuthnBrowserWithWalletChallengeRequest;
import user_api.v1.User.CreateAuthnBrowserWithWalletChallengeResponse;
import user_api.v1.UserApiServiceGrpc;
public class App {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forAddress("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build();
UserApiServiceGrpc.UserApiServiceBlockingStub blockStub =
UserApiServiceGrpc.newBlockingStub(channel);
CreateAuthnBrowserWithWalletChallengeRequest req_CreateAuthnBrowserWithWalletChallengeRequest =
CreateAuthnBrowserWithWalletChallengeRequest.newBuilder()
.build();
Iterator resp = blockStub.createAuthnBrowserWithWalletChallenge(req_CreateAuthnBrowserWithWalletChallengeRequest);
while (resp.hasNext()) {
System.out.println(resp.next());
}
channel.shutdown();
}
}
const createauthnbrowserwithwalletchallengerequest = new CreateAuthnBrowserWithWalletChallengeRequest();
const stream = service.createAuthnBrowserWithWalletChallenge(createauthnbrowserwithwalletchallengerequest)
stream.on("data", (value) => {
console.log("received ", value);
})
extern crate grpc-sdks;
use tonic::transport::Channel;
use grpc-sdks::user_api::v1::user_api_service_client::UserApiServiceClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let channel = Channel::from_static("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io")
.connect()
.await?;
let mut client = UserApiServiceClient::new(channel);
let request = tonic::Request::new(
());
// sending request and waiting for response
let response = client.create_authn_browser_with_wallet_challenge(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import user_api.v1.User.CreateAuthnBrowserWithWalletChallengeRequest
import user_api.v1.User.CreateAuthnBrowserWithWalletChallengeResponse
import user_api.v1.UserApiServiceGrpc
fun main() {
val channel = ManagedChannelBuilder
.forAddress("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build()
var blockStub = UserApiServiceGrpc.newBlockingStub(channel)
val req_CreateAuthnBrowserWithWalletChallengeRequest = CreateAuthnBrowserWithWalletChallengeRequest.newBuilder()
.build()
val resp = blockStub.createAuthnBrowserWithWalletChallenge(req_CreateAuthnBrowserWithWalletChallengeRequest)
while (resp.hasNext()) {
println(resp.next())
}
channel.shutdown()
}
returns stream of CreateAuthnBrowserWithWalletChallengeResponse
CreateAuthnBrowserWithWalletChallengeResponse
user_api.v1.CreateAuthnBrowserWithWalletChallengeResponse
user_api.v1.CreateAuthnBrowserWithWalletChallengeResponse
Field | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
did_start | oneof |
|
{
"did_start": {
"nonce": "NONCE"
}
}