Class BasicAuthHeaderEncoder
java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.BasicAuthHeaderEncoder
Encoder to used to encode user credentials in Base64.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
encodeClientCredentialsBase64
(ClientCredentials credentials) Encodes the given client credentials in Base64.static String
encodeUserPasswordBase64
(BasicCredentials credentials) Encodes the given user credentials in Base64.static String
encodeUserPasswordBase64
(String username, String password) Encodes the given username and password in Base64
-
Constructor Details
-
BasicAuthHeaderEncoder
public BasicAuthHeaderEncoder()
-
-
Method Details
-
encodeUserPasswordBase64
@Nonnull public static String encodeUserPasswordBase64(@Nonnull String username, @Nonnull String password) Encodes the given username and password in Base64- Parameters:
username
- The username to encode.password
- The password to encode.- Returns:
- The Base64 encoded credentials.
-
encodeUserPasswordBase64
Encodes the given user credentials in Base64.- Parameters:
credentials
- The credentials to encode.- Returns:
- The Base64 encoded credentials.
-
encodeClientCredentialsBase64
Encodes the given client credentials in Base64.- Parameters:
credentials
- The credentials to encode.- Returns:
- The Base64 encoded credentials.
-