Class AuthenticationService


  • @Named("u2fAuthenticationService")
    public class AuthenticationService
    extends RequestService
    Provides operations with U2F authentication request
    Version:
    August 9, 2017
    Author:
    Yuriy Movchan
    • Constructor Detail

      • AuthenticationService

        public AuthenticationService()
    • Method Detail

      • getBouncyCastleSignatureVerification

        @Produces
        @ApplicationScoped
        @Named("sha256withECDSASignatureVerification")
        public SHA256withECDSASignatureVerification getBouncyCastleSignatureVerification()
      • buildAuthenticateRequestMessage

        public io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage buildAuthenticateRequestMessage​(java.lang.String appId,
                                                                                                             java.lang.String userInum)
                                                                                                      throws io.jans.as.model.fido.u2f.exception.BadInputException,
                                                                                                             NoEligableDevicesException
        Throws:
        io.jans.as.model.fido.u2f.exception.BadInputException
        NoEligableDevicesException
      • finishAuthentication

        public DeviceRegistrationResult finishAuthentication​(io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage requestMessage,
                                                             io.jans.as.model.fido.u2f.protocol.AuthenticateResponse response,
                                                             java.lang.String userInum)
                                                      throws io.jans.as.model.fido.u2f.exception.BadInputException,
                                                             DeviceCompromisedException
        Throws:
        io.jans.as.model.fido.u2f.exception.BadInputException
        DeviceCompromisedException
      • finishAuthentication

        public DeviceRegistrationResult finishAuthentication​(io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage requestMessage,
                                                             io.jans.as.model.fido.u2f.protocol.AuthenticateResponse response,
                                                             java.lang.String userInum,
                                                             java.util.Set<java.lang.String> facets)
                                                      throws io.jans.as.model.fido.u2f.exception.BadInputException,
                                                             DeviceCompromisedException
        Throws:
        io.jans.as.model.fido.u2f.exception.BadInputException
        DeviceCompromisedException
      • getAuthenticateRequest

        public io.jans.as.model.fido.u2f.protocol.AuthenticateRequest getAuthenticateRequest​(io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage requestMessage,
                                                                                             io.jans.as.model.fido.u2f.protocol.AuthenticateResponse response)
                                                                                      throws io.jans.as.model.fido.u2f.exception.BadInputException
        Throws:
        io.jans.as.model.fido.u2f.exception.BadInputException
      • storeAuthenticationRequestMessage

        public void storeAuthenticationRequestMessage​(io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage requestMessage,
                                                      java.lang.String userInum,
                                                      java.lang.String sessionId)
      • getAuthenticationRequestMessage

        public io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage getAuthenticationRequestMessage​(java.lang.String jsId)
      • getAuthenticationRequestMessageByRequestId

        public AuthenticateRequestMessageLdap getAuthenticationRequestMessageByRequestId​(java.lang.String requestId)
      • removeAuthenticationRequestMessage

        public void removeAuthenticationRequestMessage​(AuthenticateRequestMessageLdap authenticateRequestMessageLdap)
      • getDnForAuthenticateRequestMessage

        public java.lang.String getDnForAuthenticateRequestMessage​(java.lang.String jsId)
        Build DN string for U2F authentication request