public class AssertionCasRealmDelegate extends Object implements CasRealm
CasRealm
implementation with prinicpal and role data backed by the Assertion
.
In particular, an AttributePrincipal
is expected from which the values of
the role attribute are retrieved. The default role attribute name is "role",
but this can be customized via setRoleAttributeName(String)
.
Authentication always succeeds and simply returns the given principal.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ROLE_NAME
Default role attribute name
|
Constructor and Description |
---|
AssertionCasRealmDelegate() |
Modifier and Type | Method and Description |
---|---|
Principal |
authenticate(Principal p)
Authenticates the given principal.
|
String[] |
getRoles(Principal p)
Gets the roles defined for the given principal.
|
boolean |
hasRole(Principal principal,
String role)
Determines whether the given principal possesses the given role.
|
void |
setRoleAttributeName(String name) |
public static final String DEFAULT_ROLE_NAME
public void setRoleAttributeName(String name)
name
- Name of the attribute in the principal that contains role data.public Principal authenticate(Principal p)
authenticate
in interface CasRealm
p
- Principal to authenticate.Copyright © 2006-2013 Jasig. All Rights Reserved.