public abstract class CertificateLoginModule extends PropertiesLoader implements LoginModule
PropertiesLoader.FileNameKey
debug
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, resetUsersAndGroupsCache
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
initialize
in interface LoginModule
public boolean login() throws LoginException
login
in interface LoginModule
LoginException
public boolean commit() throws LoginException
commit
in interface LoginModule
LoginException
public boolean abort() throws LoginException
abort
in interface LoginModule
LoginException
public boolean logout()
logout
in interface LoginModule
protected abstract String getUserNameForCertificates(X509Certificate[] certs) throws LoginException
certs
- The distinguished name.LoginException
protected 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.LoginException
protected String getDistinguishedName(X509Certificate[] certs)
Copyright © 2019 JBoss by Red Hat. All rights reserved.