Class RealmAuthorizationEvent
- java.lang.Object
-
- org.wildfly.security.auth.server.event.RealmEvent
-
- org.wildfly.security.auth.server.event.RealmAuthorizationEvent
-
- Direct Known Subclasses:
RealmIdentityAuthorizationEvent
public abstract class RealmAuthorizationEvent extends RealmEvent
A realm authorization event. The realm identity may be destroyed at some point after the event is handled.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private AuthorizationIdentity
authorizationIdentity
private Principal
principal
-
Constructor Summary
Constructors Modifier Constructor Description protected
RealmAuthorizationEvent(AuthorizationIdentity authorizationIdentity, Principal principal)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <P,R>
Raccept(RealmEventVisitor<P,R> visitor, P param)
Accept the given visitor, calling the method which is most applicable to this event type.AuthorizationIdentity
getAuthorizationIdentity()
Get the authorization identity of this event.Principal
getPrincipal()
Get the authorization principal.abstract boolean
isAuthorized()
Determine if this authorization was successful.
-
-
-
Field Detail
-
authorizationIdentity
private final AuthorizationIdentity authorizationIdentity
-
principal
private final Principal principal
-
-
Constructor Detail
-
RealmAuthorizationEvent
protected RealmAuthorizationEvent(AuthorizationIdentity authorizationIdentity, Principal principal)
Construct a new instance.- Parameters:
authorizationIdentity
- the authorization identityprincipal
- the authorization principal
-
-
Method Detail
-
getAuthorizationIdentity
public AuthorizationIdentity getAuthorizationIdentity()
Get the authorization identity of this event.- Returns:
- the authorization identity of this event
-
getPrincipal
public Principal getPrincipal()
Get the authorization principal. This principal is the result of the application of the security domain's principal rewriting policies and may not correspond to the name used to locate the identity in the realm.- Returns:
- the authorization principal
-
accept
public <P,R> R accept(RealmEventVisitor<P,R> visitor, P param)
Description copied from class:RealmEvent
Accept the given visitor, calling the method which is most applicable to this event type.- Overrides:
accept
in classRealmEvent
- Type Parameters:
P
- the visitor parameter typeR
- the visitor return type- Parameters:
visitor
- the visitorparam
- the parameter to pass to the visitorhandleXxx
method- Returns:
- the value returned from the visitor
handleXxx
method
-
isAuthorized
public abstract boolean isAuthorized()
Determine if this authorization was successful.- Returns:
true
if the authentication was successful,false
if it failed
-
-