public class ConfluenceAuthenticator extends ExternalKenmeiApiAuthenticator<ConfluenceAuthenticationRequest>
JSON_PARAM_EMAIL, JSON_PARAM_FIRST_NAME, JSON_PARAM_LANG, JSON_PARAM_LAST_NAME, JSON_PARAM_LOGIN, JSON_PARAM_NAME, JSON_PARAM_USER_FOUND
Constructor and Description |
---|
ConfluenceAuthenticator(ConfluenceConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.http.client.methods.HttpRequestBase |
createMethod(ConfluenceAuthenticationRequest authenticationRequest,
boolean isQuerying) |
protected ExternalUserVO |
createUserVO()
Creates a prepared value object.
|
protected void |
extractUserData(org.codehaus.jackson.node.ObjectNode jsonUser,
ExternalUserVO userVO)
Copies user data from a JSON object to a value object.
|
protected String |
getAuthenticationApiUrl() |
protected boolean |
isValidJsonUser(org.codehaus.jackson.node.ObjectNode jsonUser)
Can be used to validate the received user after receiving it from the foreign system.
|
protected void |
validateRetrievedUser(ConfluenceAuthenticationRequest confuenceAuthRequest,
ExternalUserVO userVO)
Method is called after an authentication call has been made.
|
assertFieldsExist, authenticate, configureHttpClient, prepareDefaultUserVO, queryUserData
public ConfluenceAuthenticator(ConfluenceConfiguration configuration)
configuration
- the configuration to useprotected org.apache.http.client.methods.HttpRequestBase createMethod(ConfluenceAuthenticationRequest authenticationRequest, boolean isQuerying)
createMethod
in class ExternalKenmeiApiAuthenticator<ConfluenceAuthenticationRequest>
authenticationRequest
- the authentication requestisQuerying
- true if the request is not an authentication one but to get the user data of a
specific userprotected ExternalUserVO createUserVO()
createUserVO
in class ExternalKenmeiApiAuthenticator<ConfluenceAuthenticationRequest>
protected void extractUserData(org.codehaus.jackson.node.ObjectNode jsonUser, ExternalUserVO userVO) throws org.springframework.security.authentication.AuthenticationServiceException
extractUserData
in class ExternalKenmeiApiAuthenticator<ConfluenceAuthenticationRequest>
jsonUser
- the JSON objectuserVO
- the value objectorg.springframework.security.authentication.AuthenticationServiceException
- in case the JSON object did not contain the required membersprotected String getAuthenticationApiUrl()
getAuthenticationApiUrl
in class ExternalKenmeiApiAuthenticator<ConfluenceAuthenticationRequest>
protected boolean isValidJsonUser(org.codehaus.jackson.node.ObjectNode jsonUser)
ExternalKenmeiApiAuthenticator
isValidJsonUser
in class ExternalKenmeiApiAuthenticator<ConfluenceAuthenticationRequest>
jsonUser
- The retrieved user as Json objectprotected void validateRetrievedUser(ConfluenceAuthenticationRequest confuenceAuthRequest, ExternalUserVO userVO)
validateRetrievedUser
in class ExternalKenmeiApiAuthenticator<ConfluenceAuthenticationRequest>
confuenceAuthRequest
- the requestuserVO
- the retrieved userCopyright © 2019 Communote team. All rights reserved.