public class JwtValidatorBuilder extends Object
OAuth2ServiceConfiguration. with(Validator) method.| Modifier and Type | Method and Description |
|---|---|
CombiningValidator<Token> |
build()
Builds the validators with the applied parameters.
|
JwtValidatorBuilder |
configureAnotherServiceInstance(OAuth2ServiceConfiguration otherConfiguration)
Allows to provide another service configuration, e.g.
|
static JwtValidatorBuilder |
getInstance(OAuth2ServiceConfiguration configuration)
Creates a builder instance that can be configured further.
|
JwtValidatorBuilder |
with(Validator<Token> validator)
Adds a custom validator to the validation chain.
|
JwtValidatorBuilder |
withAudienceValidator(Validator<Token> audienceValidator)
Sets / overwrites the default audience validator.
|
JwtValidatorBuilder |
withHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
In case you want to configure the
OidcConfigurationService and the
the OAuth2TokenKeyService with your own Rest client. |
JwtValidatorBuilder |
withOAuth2TokenKeyService(OAuth2TokenKeyService tokenKeyService)
Deprecated.
for internal use only
|
JwtValidatorBuilder |
withOidcConfigurationService(OidcConfigurationService oidcConfigurationService)
Deprecated.
for internal use only
|
JwtValidatorBuilder |
withValidatorListener(ValidationListener validationListener)
Adds the validation listener to the jwt validator that is being built.
|
public static JwtValidatorBuilder getInstance(OAuth2ServiceConfiguration configuration)
configuration - the identity service configurationpublic JwtValidatorBuilder with(Validator<Token> validator)
validator - the validator used for validation.public JwtValidatorBuilder withAudienceValidator(Validator<Token> audienceValidator)
audienceValidator - the validator used for validation.@Deprecated public JwtValidatorBuilder withOAuth2TokenKeyService(OAuth2TokenKeyService tokenKeyService)
OAuth2TokenKeyService instance.tokenKeyService - your token key service@Deprecated public JwtValidatorBuilder withOidcConfigurationService(OidcConfigurationService oidcConfigurationService)
OAuth2TokenKeyService instance.oidcConfigurationService - your token key servicepublic JwtValidatorBuilder withHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
OidcConfigurationService and the
the OAuth2TokenKeyService with your own Rest client.httpClient - your own http clientpublic JwtValidatorBuilder configureAnotherServiceInstance(@Nullable OAuth2ServiceConfiguration otherConfiguration)
otherConfiguration - the configuration of the other service instance, e.g. the brokerpublic JwtValidatorBuilder withValidatorListener(ValidationListener validationListener)
validationListener - the listener to be added to the validator.public CombiningValidator<Token> build()
Copyright © 2020. All rights reserved.