Interface AuthMaterial
-
- All Known Subinterfaces:
JWTToken
- All Known Implementing Classes:
AnonymousMaterial,AuthenticationMaterial,OAuth2Token,SessionToken
public interface AuthMaterialAn instance ofAuthMaterialprovides information for the authenticationgetCredentials()and authorizationgetAuthHeader()/getRawAuthHeader()of aSession.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @Nullable org.apache.hc.core5.http.HeadergetAuthHeader()Builds and returns an authorizationHeaderfor a session.
This may validly returnnullfor anonymousSessions.
Unless overridden, this method uses the result ofgetRawAuthHeader().@Nullable org.apache.hc.client5.http.auth.CredentialsgetCredentials()@Nullable StringgetRawAuthHeader()@NotNull StringgetToken()Returns the raw String token, that shall be passed to the authorizationHeader.
-
-
-
Method Detail
-
getCredentials
@Nullable @Nullable org.apache.hc.client5.http.auth.Credentials getCredentials()
Provides
Credentialsfor the authentication of aSession.
This may validly returnnullfor anonymousSessions, or in case an authentication is superfluous, because some other means is used to authorize theSession.- Returns:
Credentialsfor the authentication of aSession.
-
getAuthHeader
@Nullable default @Nullable org.apache.hc.core5.http.Header getAuthHeader()
Builds and returns an authorization
Headerfor a session.
This may validly returnnullfor anonymousSessions.
Unless overridden, this method uses the result ofgetRawAuthHeader().- Returns:
- An authorization
Headerfor a session. - See Also:
getRawAuthHeader()
-
getRawAuthHeader
@Nullable @Nullable String getRawAuthHeader()
-
getToken
@NotNull @NotNull String getToken()
Returns the raw String token, that shall be passed to the authorizationHeader.- Returns:
- The raw String token, that shall be passed to the authorization
Header.
-
-