Interface IAuthClientHelper
- All Known Implementing Classes:
AuthClientHelper
public interface IAuthClientHelper
Defines utility methods for handling authentication-related tasks.
Implementations of this interface provide functionalities such as
constructing HTTP request bodies, converting endpoint strings to URIs,
and parsing authentication responses.
-
Method Summary
Modifier and TypeMethodDescriptionconvertEndpointStringToURI
(String tokenEndpoint) Converts a token endpoint URL string into aURI
object.convertResponseToObject
(String responseBody) Converts a JSON response body into anAccessToken
object.createRequestBody
(String clientId, String clientSecret) Creates a request body for a client credentials grant type.
-
Method Details
-
convertEndpointStringToURI
Converts a token endpoint URL string into aURI
object. -
convertResponseToObject
Converts a JSON response body into anAccessToken
object.- Parameters:
responseBody
- the JSON response body as aString
.- Returns:
- an
AccessToken
object created from the response body.
-
createRequestBody
Creates a request body for a client credentials grant type. The request body includes the client ID and client secret encoded as URL parameters.- Parameters:
clientId
- the client ID as aString
.clientSecret
- the client secret as aString
.- Returns:
- a
HttpRequest.BodyPublisher
containing the request body.
-