public static class OAuth2CredentialSource.Builder extends Object
Modifier and Type | Method and Description |
---|---|
OAuth2CredentialSource |
build()
Creates a new
OAuth2CredentialSource instance. |
OAuth2CredentialSource.Builder |
clientCredentials(String id,
String secret)
Configure OAuth2 Client Credentials Grant Type as defined by the OAuth2 specification.
|
OAuth2CredentialSource.Builder |
grantScopes(String scopes)
The scopes to grant access.
|
OAuth2CredentialSource.Builder |
useResourceOwnerPassword(String userName,
String password)
Configure OAuth2 Resource Owner Password Grant Type as defined by the OAuth2 specification.
|
OAuth2CredentialSource.Builder |
useSslContext(SSLContext sslContext)
TThe
SSLContext to be used in case connections to remote server require TLS/HTTPS. |
OAuth2CredentialSource.Builder |
useSslHostnameVerifier(HostnameVerifier hostnameVerifier)
TThe
HostnameVerifier to be used in case connections to remote server require TLS/HTTPS. |
public OAuth2CredentialSource.Builder grantScopes(String scopes)
scopes
- the scopes to grant access.public OAuth2CredentialSource.Builder useResourceOwnerPassword(String userName, String password)
Configure OAuth2 Resource Owner Password Grant Type as defined by the OAuth2 specification.
When using this grant type, make sure to also configure one of the supported client authentication methods. For instance,
make sure to provide client credentials via clientCredentials(String, String)
.
userName
- the resource owner's user namepassword
- the resource owner's passwordpublic OAuth2CredentialSource.Builder clientCredentials(String id, String secret)
Configure OAuth2 Client Credentials Grant Type as defined by the OAuth2 specification.
id
- the client idsecret
- the client secretpublic OAuth2CredentialSource.Builder useSslContext(SSLContext sslContext)
SSLContext
to be used in case connections to remote server require TLS/HTTPS.sslContext
- the SSLContextpublic OAuth2CredentialSource.Builder useSslHostnameVerifier(HostnameVerifier hostnameVerifier)
HostnameVerifier
to be used in case connections to remote server require TLS/HTTPS.hostnameVerifier
- the HostnameVerifierpublic OAuth2CredentialSource build()
OAuth2CredentialSource
instance.Copyright © 2017 JBoss by Red Hat. All rights reserved.