public class CasdoorShiroRealm
extends org.apache.shiro.realm.AuthorizingRealm
Realm implementation that parses and validate Casdoor JWT Access Tokens.
NOTE: This realm MUST be use with the Shiro Bearer Token Filter authcBearer
| Constructor and Description |
|---|
CasdoorShiroRealm() |
CasdoorShiroRealm(String endpoint,
String clientId,
String clientSecret,
String jwtPublicKey,
String organizationName,
String applicationName) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.shiro.authc.AuthenticationInfo |
doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken authenticationToken) |
protected org.apache.shiro.authz.AuthorizationInfo |
doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principalCollection) |
String |
getApplicationName() |
String |
getClientId() |
String |
getClientSecret() |
String |
getEndpoint() |
String |
getJwtPublicKey() |
String |
getOrganizationName() |
protected void |
onInit() |
void |
setApplicationName(String applicationName) |
void |
setClientId(String clientId) |
void |
setClientSecret(String clientSecret) |
void |
setEndpoint(String endpoint) |
void |
setJwtPublicKey(String jwtPublicKey) |
void |
setOrganizationName(String organizationName) |
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, setCachingEnabledprotected void onInit()
onInit in class org.apache.shiro.realm.AuthorizingRealmprotected org.apache.shiro.authc.AuthenticationInfo doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken authenticationToken)
throws org.apache.shiro.authc.AuthenticationException
doGetAuthenticationInfo in class org.apache.shiro.realm.AuthenticatingRealmorg.apache.shiro.authc.AuthenticationExceptionprotected org.apache.shiro.authz.AuthorizationInfo doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principalCollection)
doGetAuthorizationInfo in class org.apache.shiro.realm.AuthorizingRealmpublic String getEndpoint()
public void setEndpoint(String endpoint)
public String getClientId()
public void setClientId(String clientId)
public String getClientSecret()
public void setClientSecret(String clientSecret)
public String getJwtPublicKey()
public void setJwtPublicKey(String jwtPublicKey)
public String getOrganizationName()
public void setOrganizationName(String organizationName)
public String getApplicationName()
public void setApplicationName(String applicationName)
Copyright © 2022. All rights reserved.