Package com.inrupt.client.openid
Class TokenRequest.Builder
- java.lang.Object
-
- com.inrupt.client.openid.TokenRequest.Builder
-
- Enclosing class:
- TokenRequest
public static class TokenRequest.Builder extends Object
A builder class forTokenRequest
objects.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenRequest.Builder
authMethod(String authMethod)
Set the authentication method for the token endpoint.TokenRequest
build(String grantType, String clientId)
Build a token request.TokenRequest.Builder
clientSecret(String clientSecret)
Set the client secret value.TokenRequest.Builder
code(String code)
Set the authorization code value.TokenRequest.Builder
codeVerifier(String codeVerifier)
Set the PKCE code verifier for the token endpoint.TokenRequest.Builder
redirectUri(URI redirectUri)
Set the redirect URI value.TokenRequest.Builder
scopes(String... scopes)
Set one or more scope values.
-
-
-
Method Detail
-
clientSecret
public TokenRequest.Builder clientSecret(String clientSecret)
Set the client secret value.- Parameters:
clientSecret
- the client secret- Returns:
- this builder
-
codeVerifier
public TokenRequest.Builder codeVerifier(String codeVerifier)
Set the PKCE code verifier for the token endpoint.- Parameters:
codeVerifier
- the code verifier- Returns:
- this builder
-
scopes
public TokenRequest.Builder scopes(String... scopes)
Set one or more scope values.- Parameters:
scopes
- the scope values- Returns:
- this builder
-
authMethod
public TokenRequest.Builder authMethod(String authMethod)
Set the authentication method for the token endpoint.- Parameters:
authMethod
- the authentication method- Returns:
- this builder
-
code
public TokenRequest.Builder code(String code)
Set the authorization code value.- Parameters:
code
- the authorization code- Returns:
- this builder
-
redirectUri
public TokenRequest.Builder redirectUri(URI redirectUri)
Set the redirect URI value.- Parameters:
redirectUri
- the redirect URI- Returns:
- this builder
-
build
public TokenRequest build(String grantType, String clientId)
Build a token request.- Parameters:
grantType
- the grant typeclientId
- the client id- Returns:
- the token request
-
-