@Deprecated public class CasRealm extends org.apache.shiro.realm.AuthorizingRealm
CasToken (which essentially
wraps a CAS service ticket) and validates it against the CAS server using a configured CAS
TicketValidator.
The validationProtocol is CAS by default, which indicates that a
a Cas20ServiceTicketValidator
will be used for ticket validation. You can alternatively set
or Saml11TicketValidator of CAS client. It is based on
AuthorizingRealm for both authentication and authorization. User id and attributes are retrieved from the CAS
service ticket validation response during authentication phase. Roles and permissions are computed during authorization phase (according
to the attributes previously retrieved).| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME
Deprecated.
|
static String |
DEFAULT_VALIDATION_PROTOCOL
Deprecated.
|
| Constructor and Description |
|---|
CasRealm()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.jasig.cas.client.validation.TicketValidator |
createTicketValidator()
Deprecated.
|
protected org.apache.shiro.authc.AuthenticationInfo |
doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token)
Deprecated.
Authenticates a user and retrieves its information.
|
protected org.apache.shiro.authz.AuthorizationInfo |
doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals)
Deprecated.
Retrieves the AuthorizationInfo for the given principals (the CAS previously authenticated user : id + attributes).
|
protected org.jasig.cas.client.validation.TicketValidator |
ensureTicketValidator()
Deprecated.
|
String |
getCasServerUrlPrefix()
Deprecated.
|
String |
getCasService()
Deprecated.
|
String |
getDefaultPermissions()
Deprecated.
|
String |
getDefaultRoles()
Deprecated.
|
String |
getPermissionAttributeNames()
Deprecated.
|
String |
getRememberMeAttributeName()
Deprecated.
|
String |
getRoleAttributeNames()
Deprecated.
|
String |
getValidationProtocol()
Deprecated.
|
protected void |
onInit()
Deprecated.
|
void |
setCasServerUrlPrefix(String casServerUrlPrefix)
Deprecated.
|
void |
setCasService(String casService)
Deprecated.
|
void |
setDefaultPermissions(String defaultPermissions)
Deprecated.
|
void |
setDefaultRoles(String defaultRoles)
Deprecated.
|
void |
setPermissionAttributeNames(String permissionAttributeNames)
Deprecated.
|
void |
setRememberMeAttributeName(String rememberMeAttributeName)
Deprecated.
|
void |
setRoleAttributeNames(String roleAttributeNames)
Deprecated.
|
void |
setValidationProtocol(String validationProtocol)
Deprecated.
|
afterCacheManagerSet, checkPermission, checkPermission, checkPermission, checkPermissions, checkPermissions, checkPermissions, checkRole, checkRole, checkRoles, checkRoles, checkRoles, clearCachedAuthorizationInfo, doClearCache, getAuthorizationCache, getAuthorizationCacheKey, getAuthorizationCacheName, getAuthorizationInfo, getPermissionResolver, getPermissions, getRolePermissionResolver, hasAllRoles, hasRole, hasRole, hasRoles, hasRoles, isAuthorizationCachingEnabled, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, isPermittedAll, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setName, setPermissionResolver, setRolePermissionResolverassertCredentialsMatch, clearCachedAuthenticationInfo, getAuthenticationCache, getAuthenticationCacheKey, getAuthenticationCacheKey, getAuthenticationCacheName, getAuthenticationInfo, getAuthenticationTokenClass, getCredentialsMatcher, init, isAuthenticationCachingEnabled, isAuthenticationCachingEnabled, setAuthenticationCache, setAuthenticationCacheName, setAuthenticationCachingEnabled, setAuthenticationTokenClass, setCredentialsMatcher, supportsclearCache, getAvailablePrincipal, getCacheManager, getName, isCachingEnabled, onLogout, setCacheManager, setCachingEnabledpublic static final String DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME
public static final String DEFAULT_VALIDATION_PROTOCOL
protected void onInit()
onInit in class org.apache.shiro.realm.AuthorizingRealmprotected org.jasig.cas.client.validation.TicketValidator ensureTicketValidator()
protected org.jasig.cas.client.validation.TicketValidator createTicketValidator()
protected org.apache.shiro.authc.AuthenticationInfo doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token)
throws org.apache.shiro.authc.AuthenticationException
doGetAuthenticationInfo in class org.apache.shiro.realm.AuthenticatingRealmtoken - the authentication tokenorg.apache.shiro.authc.AuthenticationException - if there is an error during authentication.protected org.apache.shiro.authz.AuthorizationInfo doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals)
doGetAuthorizationInfo in class org.apache.shiro.realm.AuthorizingRealmprincipals - the primary identifying principals of the AuthorizationInfo that should be retrieved.public String getCasServerUrlPrefix()
public void setCasServerUrlPrefix(String casServerUrlPrefix)
public String getCasService()
public void setCasService(String casService)
public String getValidationProtocol()
public void setValidationProtocol(String validationProtocol)
public String getRememberMeAttributeName()
public void setRememberMeAttributeName(String rememberMeAttributeName)
public String getDefaultRoles()
public void setDefaultRoles(String defaultRoles)
public String getDefaultPermissions()
public void setDefaultPermissions(String defaultPermissions)
public String getRoleAttributeNames()
public void setRoleAttributeNames(String roleAttributeNames)
public String getPermissionAttributeNames()
public void setPermissionAttributeNames(String permissionAttributeNames)
Copyright © 2004–2017 The Apache Software Foundation. All rights reserved.