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. EitherRemotelyAuthenticatedPrincipal
is 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 RemoteSandboxAuthnContext
failedAuthn(Exception authnException, String logs, RemotelyAuthenticatedInput input)
Optional<Exception>
getAuthnException()
String
getLogs()
Optional<RemotelyAuthenticatedPrincipal>
getRemotePrincipal()
static RemoteSandboxAuthnContext
succeededAuthn(RemotelyAuthenticatedPrincipal authnResult, String logs)
String
toString()
-
-
-
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:
getRemotePrincipal
in interfaceSandboxAuthnContext
-
getAuthnException
public Optional<Exception> getAuthnException()
- Specified by:
getAuthnException
in interfaceSandboxAuthnContext
-
getLogs
public String getLogs()
- Specified by:
getLogs
in interfaceSandboxAuthnContext
-
-