public class JBossTimeBasedOTPLoginModule extends Object implements LoginModule
Login Module that can be configured to validate a Time based OTP.
Usage:
This login module needs to be configured along with one of the other JBoss login modules such
as org.jboss.security.auth.spi.DatabaseServerLoginModule or
org.jboss.security.auth.spi.LdapLoginModule
<application-policy name="otp">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/jmx-console-users.properties</module-option>
<module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
</login-module>
<login-module code="org.jboss.security.auth.spi.otp.JBossTimeBasedOTPLoginModule" />
</authentication>
</application-policy>
Configurable Options:
This login module requires the presence of "otp-users.properties" on the class path with the format: username=key
An example of otp-users.properties is:
admin=35cae61d6d51a7b3af
| Constructor and Description |
|---|
JBossTimeBasedOTPLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort() |
boolean |
commit() |
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map<String,?> sharedState,
Map<String,?> options) |
boolean |
login() |
boolean |
logout() |
public static final String TOTP
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
initialize in interface LoginModulepublic boolean login()
throws LoginException
login in interface LoginModuleLoginExceptionLoginModule#login()}public boolean commit()
throws LoginException
commit in interface LoginModuleLoginExceptionLoginModule#commit()}public boolean abort()
throws LoginException
abort in interface LoginModuleLoginExceptionLoginModule#abort()}public boolean logout()
throws LoginException
logout in interface LoginModuleLoginExceptionLoginModule#logout()}Copyright © 2018 JBoss by Red Hat. All rights reserved.