public class KnoxPamRealm
extends org.apache.shiro.realm.AuthorizingRealm
Realm that uses
libpam4j to interface with
the PAM system libraries.
This is a single Shiro Realm that interfaces with the OS's
PAM subsystem which itself can be connected to several authentication
methods (unix-crypt,Samba, LDAP, etc.)
This Realm can also take part in Shiro's Pluggable Realms concept.
Using a KnoxPamRealm requires a PAM service name. This is the
name of the file under /etc/pam.d that is used to initialise and
configure the PAM subsystem. Normally, this file reflects the application
using it. For example gdm, su, etc. There is no default value
for this property.
For example, defining this realm in Shiro .ini:
[main] pamRealm = org.apache.shiro.realm.libpam4j.KnoxPamRealm pamRealm.service = [ knox-pam-ldap-service | knox-pam-os-service | knox-pam-winbind-service ] [urls] **=authcBasic
| Constructor and Description |
|---|
KnoxPamRealm() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.shiro.authc.AuthenticationInfo |
doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token) |
protected org.apache.shiro.authz.AuthorizationInfo |
doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals) |
String |
getService() |
void |
setService(String service) |
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, onInit, 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 void setService(String service)
public String getService()
protected org.apache.shiro.authz.AuthorizationInfo doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals)
doGetAuthorizationInfo in class org.apache.shiro.realm.AuthorizingRealmprotected 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.AuthenticatingRealmorg.apache.shiro.authc.AuthenticationExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.