public class OAuth2Options extends Object
HttpClient
will make connections.Constructor and Description |
---|
OAuth2Options()
Default constructor
|
OAuth2Options(JsonObject json)
Constructor to create an options from JSON
|
OAuth2Options(OAuth2Options other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
OAuth2Options |
addPubSecKey(PubSecKeyOptions pubSecKey) |
OAuth2Options |
addSupportedGrantType(String supportedGrantType) |
String |
getAuthorizationPath()
Get the Oauth2 authorization resource path.
|
String |
getClientAssertion() |
String |
getClientAssertionType() |
String |
getClientId()
Get the provider client id
|
String |
getClientID()
Deprecated.
see
getClientId() |
String |
getClientSecret()
Get the provider client secret
|
JsonObject |
getExtraParameters()
Extra parameters to send to the provider
|
OAuth2FlowType |
getFlow()
Deprecated.
|
JsonObject |
getHeaders()
Custom headers to send along with every request.
|
HttpClientOptions |
getHttpClientOptions() |
String |
getIntrospectionPath()
The provider token introspection resource path
|
long |
getJwkMaxAgeInSeconds() |
String |
getJwkPath() |
JWTOptions |
getJWTOptions() |
String |
getLogoutPath()
The provider logout path
|
List<PubSecKeyOptions> |
getPubSecKeys()
The provider PubSec key options
|
String |
getRevocationPath()
Get the Oauth2 revocation resource path.
|
String |
getScopeSeparator()
Set the provider scope separator
|
String |
getSite() |
List<String> |
getSupportedGrantTypes()
The provider supported grant types
|
String |
getTenant() |
String |
getTokenPath()
Get the Oauth2 token resource path.
|
String |
getUserAgent()
The User-Agent header to use when communicating with a provider
|
JsonObject |
getUserInfoParameters()
Set the provider custom userInfo parameters to send when requesting them.
|
String |
getUserInfoPath()
The provider userInfo resource path
|
boolean |
isRotateJWKs()
Deprecated.
|
boolean |
isValidateIssuer() |
void |
replaceVariables(boolean strict) |
OAuth2Options |
setAuthorizationPath(String authorizationPath) |
OAuth2Options |
setClientAssertion(String clientAssertion) |
OAuth2Options |
setClientAssertionType(String clientAssertionType) |
OAuth2Options |
setClientId(String clientId)
Set the provider client id
|
OAuth2Options |
setClientID(String clientID)
Deprecated.
|
OAuth2Options |
setClientSecret(String clientSecret)
Set the provider client secret
|
OAuth2Options |
setExtraParameters(JsonObject extraParams)
Set extra parameters to be sent to the provider on each request
|
OAuth2Options |
setFlow(OAuth2FlowType flow)
Deprecated.
|
OAuth2Options |
setHeaders(JsonObject headers)
Set custom headers to be sent with every request to the provider
|
OAuth2Options |
setHttpClientOptions(HttpClientOptions httpClientOptions) |
OAuth2Options |
setIntrospectionPath(String introspectionPath)
Set the provider token introspection resource path
|
void |
setJwkMaxAgeInSeconds(long jwkMaxAgeInSeconds)
-1 means no rotation for JWKs
|
OAuth2Options |
setJwkPath(String jwkPath) |
OAuth2Options |
setJWTOptions(JWTOptions jwtOptions) |
OAuth2Options |
setLogoutPath(String logoutPath)
Set the provider logout path
|
OAuth2Options |
setPubSecKeys(List<PubSecKeyOptions> pubSecKeys) |
OAuth2Options |
setRevocationPath(String revocationPath)
Set the Oauth2 revocation resource path.
|
OAuth2Options |
setRotateJWKs(boolean rotateJWKs)
Deprecated.
use
setJwkMaxAgeInSeconds(long) instead |
OAuth2Options |
setScopeSeparator(String scopeSeparator)
Set the provider scope separator
|
OAuth2Options |
setSite(String site)
Root URL for the provider without trailing slashes
|
OAuth2Options |
setSupportedGrantTypes(List<String> supportedGrantTypes) |
OAuth2Options |
setTenant(String tenant)
Sets an optional tenant.
|
OAuth2Options |
setTokenPath(String tokenPath) |
OAuth2Options |
setUserAgent(String userAgent)
Set a custom user agent to use when communicating to a provider
|
OAuth2Options |
setUserInfoParameters(JsonObject userInfoParams)
Set custom parameters to be sent during the userInfo resource request
|
OAuth2Options |
setUserInfoPath(String userInfoPath)
Set the provider userInfo resource path
|
OAuth2Options |
setValidateIssuer(boolean validateIssuer) |
JsonObject |
toJson() |
String |
toString() |
void |
validate() |
public OAuth2Options()
public OAuth2Options(OAuth2Options other)
other
- the options to copypublic OAuth2Options(JsonObject json)
json
- the JSONpublic String getSite()
public String getAuthorizationPath()
public OAuth2Options setAuthorizationPath(String authorizationPath)
public String getTokenPath()
public OAuth2Options setTokenPath(String tokenPath)
public String getRevocationPath()
public OAuth2Options setRevocationPath(String revocationPath)
public OAuth2Options setSite(String site)
site
- a url@Deprecated public String getClientID()
getClientId()
@Deprecated public OAuth2Options setClientID(String clientID)
setClientId(String)
public String getClientId()
public OAuth2Options setClientId(String clientId)
clientId
- client idpublic String getClientSecret()
public OAuth2Options setClientSecret(String clientSecret)
clientSecret
- client secretpublic String getClientAssertionType()
public OAuth2Options setClientAssertionType(String clientAssertionType)
public String getClientAssertion()
public OAuth2Options setClientAssertion(String clientAssertion)
public String getUserAgent()
public OAuth2Options setUserAgent(String userAgent)
userAgent
- the user agentpublic JsonObject getHeaders()
public OAuth2Options setHeaders(JsonObject headers)
headers
- the headerspublic List<PubSecKeyOptions> getPubSecKeys()
public OAuth2Options setPubSecKeys(List<PubSecKeyOptions> pubSecKeys)
public OAuth2Options addPubSecKey(PubSecKeyOptions pubSecKey)
public String getLogoutPath()
public OAuth2Options setLogoutPath(String logoutPath)
logoutPath
- a logout resource pathpublic String getUserInfoPath()
public OAuth2Options setUserInfoPath(String userInfoPath)
userInfoPath
- a resource pathpublic String getScopeSeparator()
public OAuth2Options setScopeSeparator(String scopeSeparator)
scopeSeparator
- a separator e.g.: ' ', '+', ','public JsonObject getExtraParameters()
public OAuth2Options setExtraParameters(JsonObject extraParams)
extraParams
- a json representation of the parameterspublic String getIntrospectionPath()
public OAuth2Options setIntrospectionPath(String introspectionPath)
introspectionPath
- a resource pathpublic JsonObject getUserInfoParameters()
public OAuth2Options setUserInfoParameters(JsonObject userInfoParams)
userInfoParams
- json representation of the parameterspublic String getJwkPath()
public OAuth2Options setJwkPath(String jwkPath)
public JWTOptions getJWTOptions()
public OAuth2Options setJWTOptions(JWTOptions jwtOptions)
@Deprecated public OAuth2FlowType getFlow()
Oauth2Credentials.getFlow()
@Deprecated public OAuth2Options setFlow(OAuth2FlowType flow)
Oauth2Credentials.setFlow(OAuth2FlowType)
public boolean isValidateIssuer()
public OAuth2Options setValidateIssuer(boolean validateIssuer)
public String getTenant()
public OAuth2Options setTenant(String tenant)
Some provders may name this differently, for example: `realm`.
tenant
- the tenant/realm for this config.@Deprecated public boolean isRotateJWKs()
@Deprecated public OAuth2Options setRotateJWKs(boolean rotateJWKs)
setJwkMaxAgeInSeconds(long)
insteadrotateJWKs
- true
to rotate keys as described in OAuth2Auth.jWKSet(Handler)
.public List<String> getSupportedGrantTypes()
public OAuth2Options setSupportedGrantTypes(List<String> supportedGrantTypes)
public OAuth2Options addSupportedGrantType(String supportedGrantType)
public void replaceVariables(boolean strict)
public void validate() throws IllegalStateException
IllegalStateException
public JsonObject toJson()
public HttpClientOptions getHttpClientOptions()
public OAuth2Options setHttpClientOptions(HttpClientOptions httpClientOptions)
public long getJwkMaxAgeInSeconds()
public void setJwkMaxAgeInSeconds(long jwkMaxAgeInSeconds)
jwkMaxAgeInSeconds
- timeout of JWKs rotationCopyright © 2023 Eclipse. All rights reserved.