Class RemoteSandboxAuthnContext
- java.lang.Object
-
- pl.edu.icm.unity.engine.api.authn.remote.RemoteSandboxAuthnContext
-
- All Implemented Interfaces:
SandboxAuthnContext
public class RemoteSandboxAuthnContext extends Object implements SandboxAuthnContext
Stores full information on the remote sandboxed authentication. EitherRemotelyAuthenticatedPrincipalis provided (successful authN) or exception with unprocessedRemotelyAuthenticatedInput. The most of the information is in authnContext, which is enriched with logs and potential error. User should be careful when using the authnResult. It may happen that many of the fields are not initialized in case of authentication failure.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RemoteSandboxAuthnContextfailedAuthn(Exception authnException, String logs, RemotelyAuthenticatedInput input)Optional<Exception>getAuthnException()StringgetLogs()Optional<RemotelyAuthenticatedPrincipal>getRemotePrincipal()static RemoteSandboxAuthnContextsucceededAuthn(RemotelyAuthenticatedPrincipal authnResult, String logs)StringtoString()
-
-
-
Method Detail
-
succeededAuthn
public static RemoteSandboxAuthnContext succeededAuthn(RemotelyAuthenticatedPrincipal authnResult, String logs)
-
failedAuthn
public static RemoteSandboxAuthnContext failedAuthn(Exception authnException, String logs, RemotelyAuthenticatedInput input)
-
getRemotePrincipal
public Optional<RemotelyAuthenticatedPrincipal> getRemotePrincipal()
- Specified by:
getRemotePrincipalin interfaceSandboxAuthnContext
-
getAuthnException
public Optional<Exception> getAuthnException()
- Specified by:
getAuthnExceptionin interfaceSandboxAuthnContext
-
getLogs
public String getLogs()
- Specified by:
getLogsin interfaceSandboxAuthnContext
-
-