Class AuthenticationResult
- java.lang.Object
-
- org.camunda.bpm.engine.rest.security.auth.AuthenticationResult
-
public class AuthenticationResult extends 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 String
authenticatedUser
protected List<String>
groups
protected boolean
isAuthenticated
protected List<String>
tenants
-
Constructor Summary
Constructors Constructor Description AuthenticationResult(String authenticatedUser, boolean isAuthenticated)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthenticatedUser()
List<String>
getGroups()
List<String>
getTenants()
boolean
isAuthenticated()
void
setAuthenticated(boolean isAuthenticated)
void
setAuthenticatedUser(String authenticatedUser)
void
setGroups(List<String> groups)
void
setTenants(List<String> tenants)
static AuthenticationResult
successful(String userId)
static AuthenticationResult
unsuccessful()
static AuthenticationResult
unsuccessful(String userId)
-
-
-
Constructor Detail
-
AuthenticationResult
public AuthenticationResult(String authenticatedUser, boolean isAuthenticated)
-
-
Method Detail
-
getAuthenticatedUser
public String getAuthenticatedUser()
-
setAuthenticatedUser
public void setAuthenticatedUser(String authenticatedUser)
-
isAuthenticated
public boolean isAuthenticated()
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated)
-
successful
public static AuthenticationResult successful(String userId)
-
unsuccessful
public static AuthenticationResult unsuccessful()
-
unsuccessful
public static AuthenticationResult unsuccessful(String userId)
-
-