@UESComponent public class AuthenticationContext extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
AUTHENTICATED
Name of "authenticated" attribute.
|
private static java.lang.String |
CONSUMER
Consumer ID.
|
private static java.lang.String |
INITIATOR
Identifier of firstly authenticated user.
|
private static java.lang.String |
PRINCIPALS
Principals attribute name.
|
private UESProcessManager |
prMng
Instance of process manager.
|
private static java.lang.String |
REAUTHENTICATED
Name of "re-authentication" flag attribute.
|
private static java.lang.String |
UNLOCK_TIMEOUT
Account unlock timeout.
|
Constructor and Description |
---|
AuthenticationContext() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConsumerId()
Returns consumer ID.
|
java.lang.String |
getInitiator()
Returns initiator.
|
Principal |
getPrincipal(java.lang.Class<? extends Principal> aPrincipalClass)
Gets user principal.
|
java.util.List<Principal> |
getPrincipalChain(java.lang.Class<? extends Principal> aPrincipalClass)
Returns chain of all authenticated principals.
|
private java.util.Map<java.lang.String,Principal> |
getPrincipals(boolean initialize)
Returns map of principals.
|
long |
getUnlockTimeout()
Gets account unlock timeout.
|
java.lang.Boolean |
isAuthenticated()
Returns true if authentication context was processed (user authenticated), null if context was not processed and false if user was not
authenticated
|
boolean |
isReauthenticated()
Deprecated.
|
void |
removeContext()
Removes all context parameters from process environment.
|
void |
revokeConsumerId()
Revokes consumer ID.
|
void |
revokeInitiator()
Revokes initiator.
|
void |
revokePrincipal(java.lang.Class<? extends Principal> aPrincipalClass)
Removes user principal from context.
|
void |
setAuthenticated()
Mark authentication context as processed (user authenticated).
|
void |
setConsumerId(java.lang.String consumerId)
Sets consumer ID.
|
void |
setInitiator(java.lang.String initiator)
Sets initiator
|
void |
setNotAuthenticated()
Mark authentication context as processed (user NOT authenticated).
|
void |
setPrincipal(Principal aPrincipal)
Sets user principal.
|
void |
setReauthenticated()
Deprecated.
|
void |
setUnlockTimeout(long unlockTimeout)
Sets account unlock timeout.
|
TODO Pouze docasne reseni Platforma neumoznuje opakovane prihlaseni uzivatele, je nutne nejprve vycistit PCB (provest logout). Toto je ale problem ve skriptech, kde je zadouci prihlasit servisniho uzivatele pod kterym skript bezi (a ktery se lisi od uzivatele, ktery skript naplanoval). Toto preprihlaseni bylo doposud mozne diky spatne integraci legacy prihlaseni (v legacy bylo prihlaseno, ale platforma na toto prihlaseni nevidela, takze umoznila provest autentizaci). V ramci UES7-06 doslo k oprave integrace a tim padem by preprihlaseni prestalo fungovat. Tento workaroung zavadi flag, pomoci ktereho bude moci provest prave jedno preprihlaseni uzivatele (pouze legacy->platformna, nikoliv platforma->platforma).
aPrincipal
- User principalaPrincipalClass
- Type of principal to getaPrincipalClass
- Type of principal to revokeUESAuthenticationService.executeAs(String, UESCallable)
(each nested call adds another principal to chain). Typically there
should be from one to two elements in list.aPrincipalClass
- Principal type to be returned in chainconsumerId
- Consumer IDunlockTimeout
- Account unlock timeoutAuthenticationContext.REAUTHENTICATED
AuthenticationContext.REAUTHENTICATED
initiator
- Initiatorinitialize
- True if new principal map should be created and set on actual context (allows to set new principal on actual context), false if
method is called only for read operation.