Class PrincipalAuthorizeCallback

    • Constructor Detail

      • PrincipalAuthorizeCallback

        public PrincipalAuthorizeCallback​(String name)
        Creates a new instance to authorize the associated name. It will be transformed in a NamePrincipal.
        Parameters:
        name - the name to authorize
      • PrincipalAuthorizeCallback

        public PrincipalAuthorizeCallback​(Principal principal)
        Creates a new instance to authorize the associated principal.
        Parameters:
        principal - the principal to authorize
    • Method Detail

      • isAuthorized

        public boolean isAuthorized()
        Indicates if the principal was successfully authorized.
        Returns:
        true if the principal was successfully authorized. Otherwise, false
      • setAuthorized

        public void setAuthorized​(boolean authorized)
        Sets whether the authorization is allowed for the principal.
        Parameters:
        authorized - authorization result
      • getPrincipal

        public Principal getPrincipal()
        Returns the Principal.
        Returns:
        the principal (not null)