Class SSOAuthenticationToken

  • All Implemented Interfaces:
    Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer
    Direct Known Subclasses:
    SsoAuthToken

    public class SSOAuthenticationToken
    extends org.springframework.security.authentication.UsernamePasswordAuthenticationToken
    Provides an authentication token used for single-sign on (SSO) authentication.
    See Also:
    UsernamePasswordAuthenticationToken, Serialized Form
    • Constructor Detail

      • SSOAuthenticationToken

        public SSOAuthenticationToken​(String username)
        Creates a new SSO Authentication Token for the specified login name.
        Parameters:
        username - the login name
        Since:
        3.6.0
      • SSOAuthenticationToken

        public SSOAuthenticationToken​(String username,
                                      Map<String,​Object> attributes)
        Creates a new SSO Authentication Token for the specified login name and attributes.
        Parameters:
        username - the login name
        attributes - the user attributes
      • SSOAuthenticationToken

        public SSOAuthenticationToken​(String username,
                                      Collection<org.springframework.security.core.GrantedAuthority> authorities)
        Creates a new SsoAuthenticationToken for the specified login name and granted authorities (groups).
        Parameters:
        username - the login name
        authorities - the uses set of granted authorities or groups.
        Since:
        3.6.0
      • SSOAuthenticationToken

        public SSOAuthenticationToken​(String username,
                                      Map<String,​Object> attributes,
                                      Set<String> groups)
        Creates a new SsoAuthenticationToken for the specified login name, attributes and groups the user belongs to.
        Parameters:
        username - the login name
        attributes - the user attributes
        groups - the set of groups the user belongs to, will be marshaled into granted authorities.
      • SSOAuthenticationToken

        public SSOAuthenticationToken​(String username,
                                      Map<String,​Object> attributes,
                                      List<String> groups)
        Creates a new SsoAuthenticationToken for the specified login name, attributes and groups the user belongs to.
        Parameters:
        username - the login name
        attributes - the user attributes
        groups - the set of groups the user belongs to, will be marshaled into granted authorities.
    • Method Detail

      • getAttributes

        public Map<String,​Object> getAttributes()
        Return a map of user attributes.
        Returns:
        a map of user attributes
      • getAuthorities

        public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
        Return the list of authorities associated with the user.
        Specified by:
        getAuthorities in interface org.springframework.security.core.Authentication
        Overrides:
        getAuthorities in class org.springframework.security.authentication.AbstractAuthenticationToken
        Returns:
        an array containing GrantedAuthorityAdaptor objects representing SmartForm Manager roles
        Since:
        3.6.0
        See Also:
        Authentication.getAuthorities()
      • toString

        public String toString()
        Return the string representation of this object.
        Specified by:
        toString in interface Principal
        Overrides:
        toString in class org.springframework.security.authentication.AbstractAuthenticationToken
        Returns:
        the string representation of this object
        Since:
        3.6.0