@Service @EnableConfigurationProperties(value=AuthenticationServerConnectionProperties.class) public class AuthenticationClientDefault extends Object implements AuthenticationClient
GRANT_TYPE_PASSWORD, PARAM_GRANT_TYPE, PARAM_PASSWORD, PARAM_USERNAME, PATH_OAUTH_TOKEN_REQUEST| Constructor and Description |
|---|
AuthenticationClientDefault(org.springframework.web.client.RestTemplate authServerRestTemplate,
AuthenticationServerConnectionProperties authServerConnectionProperties) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.oauth2.common.OAuth2AccessToken |
getOauthToken(String username,
String password)
Get the OAuth2 Token for the user with the provided username and password.
|
@Autowired
public AuthenticationClientDefault(@Qualifier(value="authServerRestTemplate")
org.springframework.web.client.RestTemplate authServerRestTemplate,
AuthenticationServerConnectionProperties authServerConnectionProperties)
public org.springframework.security.oauth2.common.OAuth2AccessToken getOauthToken(String username, String password) throws org.springframework.security.core.AuthenticationException
AuthenticationClientgetOauthToken in interface AuthenticationClientusername - the username providedpassword - the password providedorg.springframework.security.core.AuthenticationExceptionCopyright © 2015–2016 Smartrac Technology Fletcher, Inc.. All rights reserved.