Class UnauthenticatedClient


  • public final class UnauthenticatedClient
    extends io.token.rpc.UnauthenticatedClient
    Similar to Client but is only used for a handful of requests that don't require authentication. We use this client to create new member or getMember an existing one and switch to the authenticated Client.
    • Field Summary

      • Fields inherited from class io.token.rpc.UnauthenticatedClient

        gateway
    • Constructor Summary

      Constructors 
      Constructor Description
      UnauthenticatedClient​(io.token.proto.gateway.GatewayServiceGrpc.GatewayServiceFutureStub gateway)
      Creates an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Member> getMember​(java.lang.String memberId)
      Looks up member information for the given member ID.
      io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Member> getTokenMember()
      Return the token member.
      io.reactivex.Observable<io.token.tokenrequest.TokenRequestResult> getTokenRequestResult​(java.lang.String tokenRequestId)
      Get the token request result based on a token's tokenRequestId.
      io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Member> recoverEidasMember​(io.token.proto.common.eidas.EidasProtos.EidasRecoveryPayload payload, java.lang.String signature, io.token.security.CryptoEngine cryptoEngine)
      Recovers an eIDAS-verified member with eidas payload.
      io.reactivex.Observable<io.token.proto.gateway.Gateway.RegisterWithEidasResponse> registerWithEidas​(io.token.proto.common.eidas.EidasProtos.RegisterWithEidasPayload payload, java.lang.String signature)
      Create and onboard a business member under realm of a bank using eIDAS certificate.
      io.reactivex.Observable<io.token.tokenrequest.TokenRequest> retrieveTokenRequest​(java.lang.String tokenRequestId)
      Retrieves a transfer token request.
      • Methods inherited from class io.token.rpc.UnauthenticatedClient

        beginRecovery, completeRecovery, completeRecoveryWithDefaultRule, createMember, createMemberId, createRecoveryAuthorization, getBanks, getBanks, getCountries, getDefaultAgent, getMemberId, getRecoveryAuthorization, resolveAlias
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UnauthenticatedClient

        public UnauthenticatedClient​(io.token.proto.gateway.GatewayServiceGrpc.GatewayServiceFutureStub gateway)
        Creates an instance.
        Parameters:
        gateway - gateway gRPC stub
    • Method Detail

      • getMember

        public io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Member> getMember​(java.lang.String memberId)
        Looks up member information for the given member ID. The user is defined by the key used for authentication.
        Parameters:
        memberId - member id
        Returns:
        an observable of member
      • getTokenMember

        public io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Member> getTokenMember()
        Return the token member.
        Returns:
        token member
      • getTokenRequestResult

        public io.reactivex.Observable<io.token.tokenrequest.TokenRequestResult> getTokenRequestResult​(java.lang.String tokenRequestId)
        Get the token request result based on a token's tokenRequestId.
        Parameters:
        tokenRequestId - token request id
        Returns:
        token request result
      • retrieveTokenRequest

        public io.reactivex.Observable<io.token.tokenrequest.TokenRequest> retrieveTokenRequest​(java.lang.String tokenRequestId)
        Retrieves a transfer token request.
        Parameters:
        tokenRequestId - token request id
        Returns:
        token request that was stored with the request id
      • registerWithEidas

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.RegisterWithEidasResponse> registerWithEidas​(io.token.proto.common.eidas.EidasProtos.RegisterWithEidasPayload payload,
                                                                                                                   java.lang.String signature)
        Create and onboard a business member under realm of a bank using eIDAS certificate.
        Parameters:
        payload - payload with eIDAS certificate and bank id
        signature - payload signed with the private key corresponding to the certificate public key
        Returns:
        member id, registered key id and id of the certificate verification request
      • recoverEidasMember

        public io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Member> recoverEidasMember​(io.token.proto.common.eidas.EidasProtos.EidasRecoveryPayload payload,
                                                                                                            java.lang.String signature,
                                                                                                            io.token.security.CryptoEngine cryptoEngine)
        Recovers an eIDAS-verified member with eidas payload.
        Parameters:
        payload - a payload containing member id, the certificate and a new key to add to the member
        signature - a payload signature with the private key corresponding to the certificate
        cryptoEngine - a crypto engine that must contain the privileged key that is included in the payload (if it does not contain keys for other levels they will be generated)
        Returns:
        an observable of a new member