|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.webapp.impl.security.auth.Authentications
public class Authentications
Wrapper around current authentications.
In camunda BPM rest and web applications, authentications are managed per process engine: at a given point in time, there might be multiple authentications active for different users and process engines in a single session. The situation is that a "physical" user may possess credentials for different process engines, each of these representing a different process engine user. For each process engine, there can be at most one authentication active in a given session.
In addition, the AuthenticationFilter binds an instance of this
class to a thread local and may be obtained by getCurrent()
| Field Summary | |
|---|---|
protected Map<String,Authentication> |
authentications
holds an entry for each processEngine->userId pair currently authenticated |
| Constructor Summary | |
|---|---|
Authentications()
|
|
| Method Summary | |
|---|---|
void |
addAuthentication(Authentication authentication)
Adds an authentication to the list of current authentications. |
static void |
clearCurrent()
clears the Authentications for the current thread. |
Authentication |
getAuthenticationForProcessEngine(String engineName)
Returns an Authentication for a provided process engine name or "null". |
List<Authentication> |
getAuthentications()
|
static Authentications |
getCurrent()
Returns the authentications for the current thread. |
static Authentications |
getFromSession(javax.servlet.http.HttpSession session)
Allows obtaining an Authentications object from the
HttpSession. |
boolean |
hasAuthenticationForProcessEngine(String engineName)
Allows checking whether a user is currently authenticated for a given process engine name. |
void |
removeAuthenticationForProcessEngine(String engineName)
Removes the authentication for the provided process engine name. |
static void |
setCurrent(Authentications auth)
sets the Authentications for the current thread in a thread local. |
static void |
updateSession(javax.servlet.http.HttpSession session,
Authentications authentications)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,Authentication> authentications
| Constructor Detail |
|---|
public Authentications()
| Method Detail |
|---|
public Authentication getAuthenticationForProcessEngine(String engineName)
Authentication for a provided process engine name or "null".
engineName - the name of the process engine for which the userId should be
retrieved.
Authentication for the provided process engine or
"null" if no user is authenticated for this process engine.public void addAuthentication(Authentication authentication)
authentication - the authentication to addpublic void removeAuthenticationForProcessEngine(String engineName)
engineName - the name of the process engine for which the authentication should
be removed.public List<Authentication> getAuthentications()
Authentications.public boolean hasAuthenticationForProcessEngine(String engineName)
engineName - the name of the process engine for which we want to check for authentication.
public static void setCurrent(Authentications auth)
Authentications for the current thread in a thread local.
auth - the Authentications to set.public static void clearCurrent()
Authentications for the current thread.
public static Authentications getCurrent()
public static Authentications getFromSession(javax.servlet.http.HttpSession session)
Authentications object from the
HttpSession. If no such object exists in the session, a new
instance is created and returned.
session - the HttpSession instance from which to retrieve the
Authentications.
public static void updateSession(javax.servlet.http.HttpSession session,
Authentications authentications)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||