public abstract class CertificateLoginModule extends PropertiesLoader implements AuditLoginModule
PropertiesLoader.FileNameKeydebug| Constructor and Description |
|---|
CertificateLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Standard JAAS override.
|
boolean |
commit()
Overriding to complete login process.
|
protected String |
getDistinguishedName(X509Certificate[] certs) |
protected abstract String |
getUserNameForCertificates(X509Certificate[] certs)
Should return a unique name corresponding to the certificates given.
|
protected abstract Set<String> |
getUserRoles(String username)
Should return a set of the roles this user belongs to.
|
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map<String,?> sharedState,
Map<String,?> options)
Overriding to allow for proper initialization.
|
boolean |
login()
Overriding to allow for certificate-based login.
|
boolean |
logout()
Standard JAAS override.
|
init, load, resetUsersAndGroupsCacheclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregisterFailureForAuditpublic void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
initialize in interface LoginModulepublic boolean login()
throws LoginException
login in interface LoginModuleLoginExceptionpublic boolean commit()
throws LoginException
commit in interface LoginModuleLoginExceptionpublic boolean abort()
throws LoginException
abort in interface LoginModuleLoginExceptionpublic boolean logout()
logout in interface LoginModuleprotected abstract String getUserNameForCertificates(X509Certificate[] certs) throws LoginException
certs - The distinguished name.LoginExceptionprotected abstract Set<String> getUserRoles(String username) throws LoginException
username - The username of the client. This is the same name that
getUserNameForDn returned for the user's DN.LoginExceptionprotected String getDistinguishedName(X509Certificate[] certs)
Copyright © 2020 The Apache Software Foundation. All rights reserved.