java.lang.Object
org.springframework.cloud.dataflow.rest.resource.about.SecurityInfo

public class SecurityInfo extends Object
Provides security related meta-information. E.g. is security enabled, username, roles etc.
Author:
Gunnar Hillert
  • 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

      public String getUsername()
      Returns:
      The username of the authenticated user, null otherwise.
    • setUsername

      public void setUsername(String username)
    • getRoles

      public List<String> getRoles()
      Returns:
      List of Roles, if no roles are associated, an empty collection is returned.
    • setRoles

      public void setRoles(List<String> roles)
    • addRole

      public SecurityInfo addRole(String role)
      Parameters:
      role - Adds the role to roles
      Returns:
      the security related meta-information