Class TokenResponse.Builder
java.lang.Object
net.shibboleth.idp.plugin.authn.duo.nimbus.impl.TokenResponse.Builder
- All Implemented Interfaces:
TokenResponse.IAccessTokenStage,TokenResponse.IBuildStage,TokenResponse.IIdTokenStage,TokenResponse.ITokenTypeStage
- Enclosing class:
- TokenResponse
public static final class TokenResponse.Builder
extends Object
implements TokenResponse.IIdTokenStage, TokenResponse.IAccessTokenStage, TokenResponse.ITokenTypeStage, TokenResponse.IBuildStage
Builder to build
TokenResponse.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Do the build.withAccessToken(String accessTokenIn) Supply the access token.withExpiresIn(Integer expires) Supply the expiration.withIdToken(String token) Supply the ID token.withRefreshToken(String refresh) Supply the refresh token.Supply the scope.withTokenType(String type) Supply the token type.
-
Field Details
-
idToken
The id token. -
accessToken
The access token. -
tokenType
The token type. -
refreshToken
The refresh token - not supported by Duo. -
expiresIn
The expiry. -
scope
The scope.
-
-
Constructor Details
-
Builder
private Builder()Constructor.
-
-
Method Details
-
withIdToken
Description copied from interface:TokenResponse.IIdTokenStageSupply the ID token.- Specified by:
withIdTokenin interfaceTokenResponse.IIdTokenStage- Parameters:
token- the ID token- Returns:
- the next stage
-
withAccessToken
Description copied from interface:TokenResponse.IAccessTokenStageSupply the access token.- Specified by:
withAccessTokenin interfaceTokenResponse.IAccessTokenStage- Parameters:
accessTokenIn- the access token- Returns:
- the next stage
-
withTokenType
Description copied from interface:TokenResponse.ITokenTypeStageSupply the token type.- Specified by:
withTokenTypein interfaceTokenResponse.ITokenTypeStage- Parameters:
type- the token type- Returns:
- the next stage
-
withRefreshToken
Description copied from interface:TokenResponse.IBuildStageSupply the refresh token.- Specified by:
withRefreshTokenin interfaceTokenResponse.IBuildStage- Parameters:
refresh- the refresh token- Returns:
- this builder
-
withExpiresIn
Description copied from interface:TokenResponse.IBuildStageSupply the expiration.- Specified by:
withExpiresInin interfaceTokenResponse.IBuildStage- Parameters:
expires- the expiration- Returns:
- this builder
-
withScope
Description copied from interface:TokenResponse.IBuildStageSupply the scope.- Specified by:
withScopein interfaceTokenResponse.IBuildStage- Parameters:
scopeIn- the scope- Returns:
- this builder
-
build
Description copied from interface:TokenResponse.IBuildStageDo the build.- Specified by:
buildin interfaceTokenResponse.IBuildStage- Returns:
- the response
-