Class AuthenticationResult
- java.lang.Object
-
- org.camunda.bpm.engine.rest.security.auth.AuthenticationResult
-
public class AuthenticationResult extends java.lang.Object
Serves as DTO to hold the result of an authentication request performed through anAuthenticationProvider
. Note that when implementing a customAuthenticationProvider
, it is not required to set groups or tenants for an AuthenticationResult, as they will be resolved later via theIdentityService
(e.g.ProcessEngineAuthenticationFilter.setAuthenticatedUser(org.camunda.bpm.engine.ProcessEngine, java.lang.String, java.util.List<java.lang.String>, java.util.List<java.lang.String>)
).
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
authenticatedUser
protected java.util.List<java.lang.String>
groups
protected boolean
isAuthenticated
protected java.util.List<java.lang.String>
tenants
-
Constructor Summary
Constructors Constructor Description AuthenticationResult(java.lang.String authenticatedUser, boolean isAuthenticated)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthenticatedUser()
java.util.List<java.lang.String>
getGroups()
java.util.List<java.lang.String>
getTenants()
boolean
isAuthenticated()
void
setAuthenticated(boolean isAuthenticated)
void
setAuthenticatedUser(java.lang.String authenticatedUser)
void
setGroups(java.util.List<java.lang.String> groups)
void
setTenants(java.util.List<java.lang.String> tenants)
static AuthenticationResult
successful(java.lang.String userId)
static AuthenticationResult
unsuccessful()
static AuthenticationResult
unsuccessful(java.lang.String userId)
-
-
-
Method Detail
-
getAuthenticatedUser
public java.lang.String getAuthenticatedUser()
-
setAuthenticatedUser
public void setAuthenticatedUser(java.lang.String authenticatedUser)
-
isAuthenticated
public boolean isAuthenticated()
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated)
-
getGroups
public java.util.List<java.lang.String> getGroups()
-
setGroups
public void setGroups(java.util.List<java.lang.String> groups)
-
getTenants
public java.util.List<java.lang.String> getTenants()
-
setTenants
public void setTenants(java.util.List<java.lang.String> tenants)
-
successful
public static AuthenticationResult successful(java.lang.String userId)
-
unsuccessful
public static AuthenticationResult unsuccessful()
-
unsuccessful
public static AuthenticationResult unsuccessful(java.lang.String userId)
-
-