AuthnBrowserWithWallet

Called from the device wallet to authenticate the browser and bearer token is sent to the browser session.

rpc AuthnBrowserWithWallet

user_api.v1.AuthnBrowserWithWallet

Called from the device wallet to authenticate the browser and bearer token is sent to the browser session.

requests AuthnBrowserWithWalletRequest

user_api.v1.AuthnBrowserWithWalletRequest

FieldTypeDescription
signaturebytesSigned value of the challenge by the wallet.
noncestringValue used for the challenge.
didstringW3C Decentralized Identifier (DID) of the wallet.
resp, _ := userApiService.AuthnBrowserWithWallet(ctx, &v1.AuthnBrowserWithWalletRequest{
  Did: "did:method-name:zDIDMultibase58Encoded",
  Nonce: "NONCE",
  Signature: []byte{7,43,94,45,233,224,182,20,162,130,118,173,186,183,149,106,184,158,176,28,128,150,10},
})
fmt.Println(resp)
const authnbrowserwithwalletrequest = new AuthnBrowserWithWalletRequest();
authnbrowserwithwalletrequest.setDid("did:method-name:zDIDMultibase58Encoded");
authnbrowserwithwalletrequest.setNonce("NONCE");
authnbrowserwithwalletrequest.setSignature(Uint8Array.from([7, 43, 94, 45, 233, 224, 182, 20, 162, 130, 118, 173, 186, 183, 149, 106, 184, 158, 176, 28, 128, 150, 10]));

service.authnBrowserWithWallet(authnbrowserwithwalletrequest, (err, value:AuthnBrowserWithWalletResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using Google.Protobuf;
using System.Text;
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 authnBrowserWithWalletRequest = new AuthnBrowserWithWalletRequest{
        Did = "did:method-name:zDIDMultibase58Encoded",
        Nonce = "NONCE",
        Signature = ByteString.CopyFrom(new byte[]{7, 43, 94, 45, 233, 224, 182, 20, 162, 130, 118, 173, 186, 183, 149, 106, 184, 158, 176, 28, 128, 150, 10}),
      };
      var reply = client.AuthnBrowserWithWallet(authnBrowserWithWalletRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import user_api.v1.User.AuthnBrowserWithWalletRequest;
import user_api.v1.User.AuthnBrowserWithWalletResponse;
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);
    
    AuthnBrowserWithWalletRequest req_AuthnBrowserWithWalletRequest =
        AuthnBrowserWithWalletRequest.newBuilder()
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .setNonce("NONCE")
          .setSignature(com.google.protobuf.ByteString.copyFrom(new byte[]{7, 43, 94, 45, 233, 224, 182, 20, 162, 130, 118, 173, 186, 183, 149, 106, 184, 158, 176, 28, 128, 150, 10}))
          .build();
    AuthnBrowserWithWalletResponse resp = blockStub.authnBrowserWithWallet(req_AuthnBrowserWithWalletRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const authnbrowserwithwalletrequest = new AuthnBrowserWithWalletRequest();
authnbrowserwithwalletrequest.setDid("did:method-name:zDIDMultibase58Encoded");
authnbrowserwithwalletrequest.setNonce("NONCE");
authnbrowserwithwalletrequest.setSignature(Uint8Array.from([7, 43, 94, 45, 233, 224, 182, 20, 162, 130, 118, 173, 186, 183, 149, 106, 184, 158, 176, 28, 128, 150, 10]));

service.authnBrowserWithWallet(authnbrowserwithwalletrequest, (err, value) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;

use grpc-sdks::user_api::v1::user_api_service_client::UserApiServiceClient;
use grpc-sdks::user_api::v1::AuthnBrowserWithWalletRequest;

#[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(
    AuthnBrowserWithWalletRequest{
      did: String::from("did:method-name:zDIDMultibase58Encoded"),
      nonce: String::from("NONCE"),
      signature: Vec::from([7, 43, 94, 45, 233, 224, 182, 20, 162, 130, 118, 173, 186, 183, 149, 106, 184, 158, 176, 28, 128, 150, 10])
    });
// sending request and waiting for response
  let response = client.authn_browser_with_wallet(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import user_api.v1.User.AuthnBrowserWithWalletRequest
import user_api.v1.User.AuthnBrowserWithWalletResponse
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_AuthnBrowserWithWalletRequest = AuthnBrowserWithWalletRequest.newBuilder()
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .setNonce("NONCE")
          .setSignature(com.google.protobuf.ByteString.copyFrom(byteArrayOf(7, 43, 94, 45, 233, 224, 182, 20, 162, 130, 118, 173, 186, 183, 149, 106, 184, 158, 176, 28, 128, 150, 10)))
          .build()
    val resp = blockStub.authnBrowserWithWallet(req_AuthnBrowserWithWalletRequest)
    println(resp)
    channel.shutdown()
}


returns AuthnBrowserWithWalletResponse

user_api.v1.AuthnBrowserWithWalletResponse

{}