public class OAuth extends AMLoginModule
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
logger |
static String |
OPENID_TOKEN |
static String |
PROFILE_SERVICE_RESPONSE |
static String |
REFRESH_TOKEN_ATTRIBUTE_CUSTOM_PROPERTY |
amCache, auditor, currentState
Constructor and Description |
---|
OAuth() |
Modifier and Type | Method and Description |
---|---|
void |
destroyModuleState()
This method should be overridden by each login module
to destroy dispensable state fields.
|
String |
extractToken(String tokenName,
String response) |
String |
getMail(String svcResponse,
String mailAttribute) |
Principal |
getPrincipal()
Abstract method must be implemeted by each login module to
get the user Principal
|
void |
init(Subject subject,
Map sharedState,
Map config)
Initialize this LoginModule.
|
void |
nullifyUsedVars()
This method should be overridden by each login module
to do some garbage collection work after the module
process is done.
|
int |
process(Callback[] callbacks,
int state)
Abstract method must be implemented by each login module to
control the flow of the login process.
|
int |
process2(Callback[] callbacks,
int state) |
String |
provisionAccountNow(AccountProvider accountProvider,
String realm,
String profileSvcResponse,
String userPassword,
org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims) |
void |
saveAttributes(Map<String,Set<String>> attributes) |
protected void |
updateAccount(AccountProvider accountProvider,
String realm,
Map<String,Set<String>> userNames,
String profileSvcResponse,
String userPassword,
org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims) |
void |
validateInput(String tag,
String inputField,
String rule,
int maxLength,
boolean allowNull) |
abort, clearInfoText, commit, createIdentity, forceCallbacksInit, getAMIdentityRepository, getAttribute, getAuditEntryDetail, getAuthenticatedPrincipals, getAuthLevel, getCallback, getCallback, getCallbackHandler, getCurrentState, getFailCount, getHttpServletRequest, getHttpServletResponse, getInfoText, getLocale, getLoginLocale, getLoginState, getMaximumFailCount, getNewUserIDs, getNumberOfStates, getOrgProfile, getOrgServiceTemplate, getPwdKey, getRequestOrg, getServiceConfig, getSessionId, getSSOSession, getUserAliasList, getUserKey, getUserProfile, getUserSessionProperty, getUserSessions, incrementFailCount, initialize, isAccountLocked, isDynamicProfileCreationEnabled, isRequired, isSessionQuotaReached, isSharedStateEnabled, isSuperAdmin, isUseFirstPassEnabled, isValidUserEntry, login, logout, replaceCallback, replaceHeader, resetCallback, resetCurrentState, setAuthLevel, setFailureID, setForceCallbacksRead, setLoginFailureURL, setLoginSuccessURL, setModuleErrorTemplate, setOrg, setSharedStateEnabled, setUserAttributes, setUserSessionProperty, storeUsername, storeUsernamePasswd, substituteHeader, substituteInfoText, validatePassword, validateUserName
public static final String PROFILE_SERVICE_RESPONSE
public static final String OPENID_TOKEN
public static final String REFRESH_TOKEN_ATTRIBUTE_CUSTOM_PROPERTY
public static org.slf4j.Logger logger
public void init(Subject subject, Map sharedState, Map config)
AMLoginModule
This is an abstract method, must be implemented by user's Login Module to initialize this LoginModule with the relevant information. If this LoginModule does not understand any of the data stored in sharedState or options parameters, they can be ignored.
init
in class AMLoginModule
subject
- - the Subject to be authenticated.sharedState
- - state shared with other configured LoginModules.config
- - options specified in the login Configuration for this
particular LoginModule. It contains all the global and organization
attribute configuration for this module. The key of the map is the
attribute name (e.g. iplanet-am-auth-ldap-server
) as
String, the value is the value of the corresponding attribute as Set.public int process(Callback[] callbacks, int state) throws LoginException
AMLoginModule
This method takes an array of sbumitted Callback, process them and decide the order of next state to go. Return -1 if the login is successful, return 0 if the LoginModule should be ignored.
process
in class AMLoginModule
callbacks
- Callback[] for this Login statestate
- Order of state. State order starts with 1.LoginException
- if login fails.public int process2(Callback[] callbacks, int state) throws LoginException
LoginException
public void saveAttributes(Map<String,Set<String>> attributes) throws AuthLoginException
AuthLoginException
public String provisionAccountNow(AccountProvider accountProvider, String realm, String profileSvcResponse, String userPassword, org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims) throws AuthLoginException
AuthLoginException
protected void updateAccount(AccountProvider accountProvider, String realm, Map<String,Set<String>> userNames, String profileSvcResponse, String userPassword, org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims) throws AuthLoginException
AuthLoginException
public void validateInput(String tag, String inputField, String rule, int maxLength, boolean allowNull) throws AuthLoginException
AuthLoginException
public Principal getPrincipal()
AMLoginModule
getPrincipal
in class AMLoginModule
public void destroyModuleState()
AMLoginModule
destroyModuleState
in class AMLoginModule
public void nullifyUsedVars()
AMLoginModule
nullifyUsedVars
in class AMLoginModule
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.