public class StormpathAuthenticator extends AbstractUsernamePasswordAuthenticator
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
StormpathAuthenticator() |
StormpathAuthenticator(String accessId,
String secretKey,
String applicationId) |
Modifier and Type | Method and Description |
---|---|
protected com.stormpath.sdk.account.Account |
authenticateAccount(UsernamePasswordCredentials credentials) |
protected Map<String,Object> |
buildAttributesFromStormpathAccount(com.stormpath.sdk.account.Account account) |
protected StormpathProfile |
createProfile(com.stormpath.sdk.account.Account account) |
String |
getAccessId() |
String |
getApplicationId() |
String |
getSecretKey() |
protected void |
internalInit(WebContext context)
Internal initialization of the object.
|
void |
setAccessId(String accessId) |
void |
setApplicationId(String applicationId) |
void |
setSecretKey(String secretKey) |
void |
validate(UsernamePasswordCredentials credentials,
WebContext context)
Validate the credentials.
|
getPasswordEncoder, setPasswordEncoder
init, reinit
public StormpathAuthenticator()
public StormpathAuthenticator(String accessId, String secretKey, String applicationId)
accessId
- accessId provided by Stormpath, for the admin user with the created API key.secretKey
- secret key provided by Stormpath, for the admin user with the created API key.applicationId
- This is application id configured on Stormpath whose login source will be used to authenticate users.protected void internalInit(WebContext context)
InitializableWebObject
internalInit
in class AbstractUsernamePasswordAuthenticator
context
- the web contextpublic void validate(UsernamePasswordCredentials credentials, WebContext context) throws HttpAction
Authenticator
CredentialsException
in case of failure.credentials
- the given credentialscontext
- the web contextHttpAction
- requires a specific HTTP action if necessaryprotected com.stormpath.sdk.account.Account authenticateAccount(UsernamePasswordCredentials credentials) throws com.stormpath.sdk.resource.ResourceException
com.stormpath.sdk.resource.ResourceException
protected StormpathProfile createProfile(com.stormpath.sdk.account.Account account)
protected Map<String,Object> buildAttributesFromStormpathAccount(com.stormpath.sdk.account.Account account)
public String getAccessId()
public void setAccessId(String accessId)
public String getSecretKey()
public void setSecretKey(String secretKey)
public String getApplicationId()
public void setApplicationId(String applicationId)
Copyright © 2016. All rights reserved.