Class InvocationContext
java.lang.Object
pl.edu.icm.unity.engine.api.authn.InvocationContext
- All Implemented Interfaces:
Serializable
Stores thread-local information about the current request metadata in thread local variable.
The thread-local variable should be set up by the binding authentication code.
The data stored includes authenticated user's identity and the selected locale.
- Author:
- K. Benedyczak
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionInvocationContext
(IdentityTaV tlsIdentity, AuthenticationRealm realm, List<AuthenticationFlow> endpointFlows) -
Method Summary
Modifier and TypeMethodDescriptionstatic InvocationContext
getRealm()
static boolean
static String
static void
setCurrent
(InvocationContext context) void
setCurrentURLUsed
(String currentURLUsed) void
setInvocationMaterial
(InvocationContext.InvocationMaterial invocationMaterial) void
void
setLoginSession
(LoginSession loginSession) void
void
setTlsIdentity
(IdentityTaV tlsIdentity) Sets a TLS authenticated identity.
-
Constructor Details
-
InvocationContext
public InvocationContext(IdentityTaV tlsIdentity, AuthenticationRealm realm, List<AuthenticationFlow> endpointFlows) - Parameters:
tlsIdentity
- TLS client-authenticated identity (of X500 type) or null if there is no TLS client connection context or it is not client authenticated.
-
-
Method Details
-
setCurrent
-
getCurrent
- Throws:
InternalException
-
hasCurrent
public static boolean hasCurrent() -
safeGetRealm
- Returns:
- current authentication realm's name or null if undefined/unknown.
-
getRealm
-
getLoginSession
-
setLoginSession
-
getLocale
- Returns:
- the locale
-
setLocale
-
getTlsIdentity
- Returns:
- the TLS authenticated identity if available or null
-
setTlsIdentity
Sets a TLS authenticated identity.- Parameters:
tlsIdentity
-
-
getEndpointFlows
-
getCurrentURLUsed
- Returns:
- the current URL which was used to trigger the current processing. Can be null. This is set on best effort basis and is not suitable for authorization or other sensitive operations. Always check if not null.
-
setCurrentURLUsed
-
getInvocationMaterial
-
setInvocationMaterial
-
getScopes
-
setScopes
-