Class PrincipalAuthorizeCallback
java.lang.Object
org.wildfly.security.auth.callback.PrincipalAuthorizeCallback
- All Implemented Interfaces:
Callback,ExtendedCallback
An authorization callback similar to javase AuthorizeCallback
but using a generic principal.
- Author:
- rmartinc
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance to authorize the associatedname.PrincipalAuthorizeCallback(Principal principal) Creates a new instance to authorize the associatedprincipal. -
Method Summary
Modifier and TypeMethodDescriptionReturns thePrincipal.booleanIndicates if the principal was successfully authorized.voidsetAuthorized(boolean authorized) Sets whether the authorization is allowed for the principal.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.auth.callback.ExtendedCallback
isOptional, needsInformation
-
Constructor Details
-
PrincipalAuthorizeCallback
Creates a new instance to authorize the associatedname. It will be transformed in aNamePrincipal.- Parameters:
name- the name to authorize
-
PrincipalAuthorizeCallback
Creates a new instance to authorize the associatedprincipal.- Parameters:
principal- the principal to authorize
-
-
Method Details
-
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
Returns thePrincipal.- Returns:
- the principal (not
null)
-