Class PrincipalAuthorizeCallback
- java.lang.Object
 - 
- org.wildfly.security.auth.callback.PrincipalAuthorizeCallback
 
 
- 
- All Implemented Interfaces:
 Callback,ExtendedCallback
public class PrincipalAuthorizeCallback extends Object implements ExtendedCallback
An authorization callback similar to javase
AuthorizeCallbackbut using a generic principal.- Author:
 - rmartinc
 
 
- 
- 
Constructor Summary
Constructors Constructor Description PrincipalAuthorizeCallback(String name)Creates a new instance to authorize the associatedname.PrincipalAuthorizeCallback(Principal principal)Creates a new instance to authorize the associatedprincipal. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrincipalgetPrincipal()Returns thePrincipal.booleanisAuthorized()Indicates 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, wait 
- 
Methods inherited from interface org.wildfly.security.auth.callback.ExtendedCallback
isOptional, needsInformation 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
PrincipalAuthorizeCallback
public PrincipalAuthorizeCallback(String name)
Creates a new instance to authorize the associatedname. It will be transformed in aNamePrincipal.- Parameters:
 name- the name to authorize
 
- 
PrincipalAuthorizeCallback
public PrincipalAuthorizeCallback(Principal principal)
Creates a new instance to authorize the associatedprincipal.- 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
 
 - 
 
 -