Class SecurityInfo
java.lang.Object
org.springframework.cloud.dataflow.rest.resource.about.SecurityInfo
Provides security related meta-information. E.g. is security enabled, username, roles
etc.
- Author:
- Gunnar Hillert
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRoles()
boolean
boolean
void
setAuthenticated
(boolean authenticated) void
setAuthenticationEnabled
(boolean authenticationEnabled) void
void
setUsername
(String username)
-
Constructor Details
-
SecurityInfo
public SecurityInfo()Default constructor for serialization frameworks.
-
-
Method Details
-
isAuthenticationEnabled
public boolean isAuthenticationEnabled()- Returns:
- true if the authentication feature is enabled, false otherwise
-
setAuthenticationEnabled
public void setAuthenticationEnabled(boolean authenticationEnabled) -
isAuthenticated
public boolean isAuthenticated()- Returns:
- True if the user is authenticated
-
setAuthenticated
public void setAuthenticated(boolean authenticated) -
getUsername
- Returns:
- The username of the authenticated user, null otherwise.
-
setUsername
-
getRoles
- Returns:
- List of Roles, if no roles are associated, an empty collection is returned.
-
setRoles
-
addRole
- Parameters:
role
- Adds the role toroles
- Returns:
- the security related meta-information
-