Class SealdSSKSTmrPlugin

  • All Implemented Interfaces:

    
    public final class SealdSSKSTmrPlugin
    
                        

    The SealdSSKSTmrPlugin class allows to use the SSKS key storage service to store Seald identities easily and securely, encrypted by a key stored on your back-end server.

    • Constructor Detail

      • SealdSSKSTmrPlugin

        SealdSSKSTmrPlugin(String ssksURL, String appId, String instanceName, Byte logLevel, Boolean logNoColor)
        Parameters:
        ssksURL - The SSKS server for this instance to use.
        appId - The ID given by the Seald server to your app.
        instanceName - An arbitrary name to give to this Seald instance.
        logLevel - The minimum level of logs you want.
        logNoColor - Should be set to false if you want to enable colors in the log output.
    • Method Detail

      • saveIdentity

         final SaveIdentityResponse saveIdentity(String sessionId, AuthFactor authFactor, ByteArray rawTMRSymKey, ByteArray identity, String challenge)

        Save the Seald account to SSKS.

        Parameters:
        sessionId - Session ID given by SSKS to your app's server.
        authFactor - Authentication method of this user, to which SSKS has sent a challenge at the request of your app's server.
        rawTMRSymKey - The raw encryption key used to encrypt / decrypt the stored identity keys.
        identity - The identity to save.
        challenge - Optional.
      • saveIdentityAsync

         final SaveIdentityResponse saveIdentityAsync(String sessionId, AuthFactor authFactor, ByteArray rawTMRSymKey, ByteArray identity, String challenge)

        Save the Seald account to SSKS.

        Parameters:
        sessionId - Session ID given by SSKS to your app's server.
        authFactor - Authentication method of this user, to which SSKS has sent a challenge at the request of your app's server.
        rawTMRSymKey - The raw encryption key used to encrypt / decrypt the stored identity keys.
        identity - The identity to save.
        challenge - Optional.
      • retrieveIdentity

         final RetrieveIdentityResponse retrieveIdentity(String sessionId, AuthFactor authFactor, String challenge, ByteArray rawTMRSymKey)

        Retrieve the Seald account previously saved with SealdSSKSTmrPlugin.saveIdentity.

        Parameters:
        sessionId - Session ID given by SSKS to your app's server.
        authFactor - Authentication method of this user, to which SSKS has sent a challenge at the request of your app's server.
        challenge - Optional.
        rawTMRSymKey - The raw encryption key used to encrypt / decrypt the stored identity keys.
      • retrieveIdentityAsync

         final RetrieveIdentityResponse retrieveIdentityAsync(String sessionId, AuthFactor authFactor, String challenge, ByteArray rawTMRSymKey)

        Retrieve the Seald account previously saved with SealdSSKSTmrPlugin.saveIdentity.

        Parameters:
        sessionId - Session ID given by SSKS to your app's server.
        authFactor - Authentication method of this user, to which SSKS has sent a challenge at the request of your app's server.
        challenge - Optional.
        rawTMRSymKey - The raw encryption key used to encrypt / decrypt the stored identity keys.
      • getFactorToken

         final GetFactorTokenResponse getFactorToken(String sessionId, AuthFactor authFactor, String challenge)

        Retrieve the TMR JWT associated with an authentication factor.

        Parameters:
        sessionId - Session ID given by SSKS to your app's server.
        authFactor - Authentication method of this user, to which SSKS has sent a challenge at the request of your app's server.
        challenge - Optional.
      • getFactorTokenAsync

         final GetFactorTokenResponse getFactorTokenAsync(String sessionId, AuthFactor authFactor, String challenge)

        Retrieve the TMR JWT associated with an authentication factor.

        Parameters:
        sessionId - Session ID given by SSKS to your app's server.
        authFactor - Authentication method of this user, to which SSKS has sent a challenge at the request of your app's server.
        challenge - Optional.