Interface ExternalOAuth
public interface ExternalOAuth
Represents a RFC 7662 compliant OAuth 2.0 Token Introspection endpoint. For more information, see Requesting an access token using an external OAuth 2.0 server.
You can only configure one external OAuth 2.0 endpoint per Project. To authenticate using multiple external services (such as social network logins), use a middle layer authentication service.
Example to create an instance using the builder pattern
ExternalOAuth externalOAuth = ExternalOAuth.builder()
.url("{url}")
.authorizationHeader("{authorizationHeader}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExternalOAuthBuilder
builder()
builder factory method for ExternalOAuthstatic ExternalOAuthBuilder
builder
(ExternalOAuth template) create builder for ExternalOAuth instancestatic ExternalOAuth
deepCopy
(ExternalOAuth template) factory method to create a deep copy of ExternalOAuth@NotNull String
Must not contain any leading or trailing whitespaces.@NotNull String
getUrl()
URL with authorization header.static ExternalOAuth
of()
factory methodstatic ExternalOAuth
of
(ExternalOAuth template) factory method to create a shallow copy ExternalOAuthvoid
setAuthorizationHeader
(String authorizationHeader) Must not contain any leading or trailing whitespaces.void
URL with authorization header.static com.fasterxml.jackson.core.type.TypeReference<ExternalOAuth>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withExternalOAuth
(Function<ExternalOAuth, T> helper) accessor map function
-
Method Details
-
getUrl
URL with authorization header.
- Returns:
- url
-
getAuthorizationHeader
Must not contain any leading or trailing whitespaces. Partially hidden on retrieval.
- Returns:
- authorizationHeader
-
setUrl
URL with authorization header.
- Parameters:
url
- value to be set
-
setAuthorizationHeader
Must not contain any leading or trailing whitespaces. Partially hidden on retrieval.
- Parameters:
authorizationHeader
- value to be set
-
of
factory method- Returns:
- instance of ExternalOAuth
-
of
factory method to create a shallow copy ExternalOAuth- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ExternalOAuth- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ExternalOAuth- Returns:
- builder
-
builder
create builder for ExternalOAuth instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withExternalOAuth
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-