Class Authentication

  • public class Authentication
    extends Object
    Definition of authentication given to username after verification of credentials by authentication provider. Each authentication must at least point to some identity (username) and roles.
    Ɓukasz Dywicki - Initial contribution, Kai Kreuzer - Added JavaDoc and switched from array to Set
    • Constructor Detail

      • Authentication

        protected Authentication()
        no-args constructor required by gson
      • Authentication

        public Authentication​(String username,
                              String... roles)
        Creates a new instance
        username - name of the user associated to this authentication instance
        roles - a variable list of roles that the user possesses.
    • Method Detail

      • getUsername

        public String getUsername()
        Retrieves the name of the authenticated user
        user name
      • getRoles

        public Set<String> getRoles()
        Retrieves the roles of the authenticated user
        a set of roles