Class ClientAuthorization
java.lang.Object
com.linecorp.armeria.common.auth.oauth2.ClientAuthorization
Deprecated.
Provides client authorization for the OAuth 2.0 requests,
as per [RFC6749], Section 2.3.
For example:
Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3
Fetches authorization source from the designated authorization or credentials supplier, which
might be facilitated by a secure Secret provider. Will fetch the authorization source for each
request. Therefore the designated supplier must cache the value in order to avoid unnecessary
network hops.
The authorization source might either provide complete authorization token or client credentials.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAsBodyParameters
(QueryParamsBuilder formBuilder) Deprecated.Fetches client credentials from the supplier and composes required body parameters, as per [RFC6749], Section 2.3:Deprecated.Fetches client credentials from the supplier and composes required body parameters, as per [RFC6749], Section 2.3:Deprecated.Fetches client authorization token or client credentials from the supplier and composes clientAuthorization
header value, as per [RFC6749], Section 2.3:static ClientAuthorization
ofAuthorization
(Supplier<String> authorizationSupplier, String authorizationType) Deprecated.UseClientAuthentication.ofAuthorization(String, String)
instead.static ClientAuthorization
ofBasicAuthorization
(Supplier<String> authorizationSupplier) Deprecated.UseClientAuthentication.ofBasic(String)
} instead.static ClientAuthorization
ofCredentials
(Supplier<? extends Map.Entry<String, String>> credentialsSupplier) Deprecated.static ClientAuthorization
ofCredentials
(Supplier<? extends Map.Entry<String, String>> credentialsSupplier, String authorizationType) Deprecated.Deprecated.Converts thisClientAuthorization
to aClientAuthentication
.toString()
Deprecated.
-
Method Details
-
ofAuthorization
@Deprecated public static ClientAuthorization ofAuthorization(Supplier<String> authorizationSupplier, String authorizationType) Deprecated.UseClientAuthentication.ofAuthorization(String, String)
instead.Provides client authorization for the OAuth 2.0 requests based on encoded authorization token and authorization type, as per [RFC6749], Section 2.3.- Parameters:
authorizationSupplier
- A supplier of encoded client authorization token.authorizationType
- One of the registered HTTP authentication schemes as per HTTP Authentication Scheme Registry.
-
ofBasicAuthorization
@Deprecated public static ClientAuthorization ofBasicAuthorization(Supplier<String> authorizationSupplier) Deprecated.UseClientAuthentication.ofBasic(String)
} instead.Provides client authorization for the OAuth 2.0 requests based on encoded authorization token andBasic
authorization type, as per [RFC6749], Section 2.3.- Parameters:
authorizationSupplier
- A supplier of encoded client authorization token.
-
ofCredentials
@Deprecated public static ClientAuthorization ofCredentials(Supplier<? extends Map.Entry<String, String>> credentialsSupplier, String authorizationType) Deprecated.Provides client authorization for the OAuth 2.0 requests based on client credentials and authorization type, as per [RFC6749], Section 2.3.- Parameters:
credentialsSupplier
- A supplier of client credentials.authorizationType
- One of the registered HTTP authentication schemes as per HTTP Authentication Scheme Registry.
-
ofCredentials
@Deprecated public static ClientAuthorization ofCredentials(Supplier<? extends Map.Entry<String, String>> credentialsSupplier) Deprecated.Provides client authorization for the OAuth 2.0 requests based on client credentials andBasic
authorization type, as per [RFC6749], Section 2.3.- Parameters:
credentialsSupplier
- A supplier of client credentials.
-
asHeaderValue
Deprecated.Fetches client authorization token or client credentials from the supplier and composes clientAuthorization
header value, as per [RFC6749], Section 2.3:
.Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3
- Returns:
- encoded client
Authorization
header value.
-
addAsBodyParameters
Deprecated.Fetches client credentials from the supplier and composes required body parameters, as per [RFC6749], Section 2.3:
. The client MAY omit theclient_id=s6BhdRkqt3&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
client_secret
parameter if the client secret is an empty string. -
asBodyParameters
Deprecated.Fetches client credentials from the supplier and composes required body parameters, as per [RFC6749], Section 2.3:
. The client MAY omit theclient_id=s6BhdRkqt3&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
client_secret
parameter if the client secret is an empty string.- Returns:
- encoded client credentials request body parameters as
QueryParams
.
-
toClientAuthentication
Deprecated.Converts thisClientAuthorization
to aClientAuthentication
. -
toString
Deprecated.
-
ClientAuthentication
instead.