public abstract class AbstractOAuth2AccessAuthorizeManager extends java.lang.Object implements SecurityAuthorizeManager
Constructor and Description |
---|
AbstractOAuth2AccessAuthorizeManager() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
buildAccessDataFromResponse(JsonObject tokenResponse,
java.lang.String tokenType)
Builds the access parameter map.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
headers()
Default headers for token service access.
|
protected SecurityAuthentication |
requestAndCreateAuthFromResponse(java.net.Proxy proxy,
java.lang.String grantType,
java.lang.String tokenType,
SURL tokenService,
java.lang.String content,
SecurityAuthentication basicAuth)
Calls the endpoint to load the token response and create a SecurityAuthentication.
|
protected java.lang.String |
urlEncode(java.lang.String data)
Encodes the data to UTF-8 into
application/x-www-form-urlencoded . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public AbstractOAuth2AccessAuthorizeManager()
protected java.util.Map<java.lang.String,java.lang.Object> headers()
Initialize with:
"Content-Type"="application/x-www-form-urlencoded; charset=UTF-8" "Accept"="application/json"
protected java.util.Map<java.lang.String,java.lang.Object> buildAccessDataFromResponse(JsonObject tokenResponse, java.lang.String tokenType)
tokenResponse
- the JSOn object with the response datatokenType
- token type to use instead of token_type from responseprotected java.lang.String urlEncode(java.lang.String data)
application/x-www-form-urlencoded
.data
- data to encodeprotected SecurityAuthentication requestAndCreateAuthFromResponse(java.net.Proxy proxy, java.lang.String grantType, java.lang.String tokenType, SURL tokenService, java.lang.String content, SecurityAuthentication basicAuth)
proxy
- Proxy for the accessgrantType
- grant typetokenType
- token type to use instead of token_type from responsetokenService
- URL to token servicecontent
- body contentbasicAuth
- principal basicAuth