Class AuthenticationService
- java.lang.Object
-
- io.jans.as.server.service.fido.u2f.RequestService
-
- io.jans.as.server.service.fido.u2f.AuthenticationService
-
@Named("u2fAuthenticationService") public class AuthenticationService extends RequestService
Provides operations with U2F authentication request- Version:
- August 9, 2017
- Author:
- Yuriy Movchan
-
-
Constructor Summary
Constructors Constructor Description AuthenticationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage
buildAuthenticateRequestMessage(java.lang.String appId, java.lang.String userInum)
DeviceRegistrationResult
finishAuthentication(io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage requestMessage, io.jans.as.model.fido.u2f.protocol.AuthenticateResponse response, java.lang.String userInum)
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)
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)
io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage
getAuthenticationRequestMessage(java.lang.String jsId)
AuthenticateRequestMessageLdap
getAuthenticationRequestMessageByRequestId(java.lang.String requestId)
SHA256withECDSASignatureVerification
getBouncyCastleSignatureVerification()
java.lang.String
getDnForAuthenticateRequestMessage(java.lang.String jsId)
Build DN string for U2F authentication requestjava.lang.String
getUserInumByKeyHandle(java.lang.String appId, java.lang.String keyHandle)
void
removeAuthenticationRequestMessage(AuthenticateRequestMessageLdap authenticateRequestMessageLdap)
io.jans.as.model.fido.u2f.protocol.AuthenticateRequest
startAuthentication(java.lang.String appId, DeviceRegistration device)
io.jans.as.model.fido.u2f.protocol.AuthenticateRequest
startAuthentication(java.lang.String appId, DeviceRegistration device, byte[] challenge)
void
storeAuthenticationRequestMessage(io.jans.as.model.fido.u2f.protocol.AuthenticateRequestMessage requestMessage, java.lang.String userInum, java.lang.String sessionId)
-
Methods inherited from class io.jans.as.server.service.fido.u2f.RequestService
getExpiredRequestMessages, removeRequestMessage
-
-
-
-
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
-
startAuthentication
public io.jans.as.model.fido.u2f.protocol.AuthenticateRequest startAuthentication(java.lang.String appId, DeviceRegistration device) throws DeviceCompromisedException
- Throws:
DeviceCompromisedException
-
startAuthentication
public io.jans.as.model.fido.u2f.protocol.AuthenticateRequest startAuthentication(java.lang.String appId, DeviceRegistration device, byte[] challenge) throws DeviceCompromisedException
- Throws:
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) 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)
-
getUserInumByKeyHandle
public java.lang.String getUserInumByKeyHandle(java.lang.String appId, java.lang.String keyHandle) throws InvalidKeyHandleDeviceException
- Throws:
InvalidKeyHandleDeviceException
-
getDnForAuthenticateRequestMessage
public java.lang.String getDnForAuthenticateRequestMessage(java.lang.String jsId)
Build DN string for U2F authentication request
-
-