Class AwsCognitoIdpUserPasswordAuthenticationInterceptor.Builder
java.lang.Object
com.helixframework.okhttp.cognito.AwsCognitoIdpUserPasswordAuthenticationInterceptor.Builder
- Enclosing class:
- AwsCognitoIdpUserPasswordAuthenticationInterceptor
Builder for creating new instances of
AwsCognitoIdpUserPasswordAuthenticationInterceptor.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(com.amazonaws.services.cognitoidp.AWSCognitoIdentityProvider cognitoIdp) Creates a new instance ofAwsCognitoIdpUserPasswordAuthenticationInterceptor.Builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a new instance ofAwsCognitoIdpUserPasswordAuthenticationInterceptor.credentials(String clientId, String username, String password) Sets the `clientId`, `username`, and `password` that will be used for authenticating with the IDP.Disables strict response code checking from the downstream service.tokenStore(TokenStore tokenStore) Sets the token storage mechanism to use.
-
Constructor Details
-
Builder
public Builder(com.amazonaws.services.cognitoidp.AWSCognitoIdentityProvider cognitoIdp) Creates a new instance ofAwsCognitoIdpUserPasswordAuthenticationInterceptor.Builder.- Parameters:
cognitoIdp- aws cognito idp client
-
-
Method Details
-
credentials
public AwsCognitoIdpUserPasswordAuthenticationInterceptor.Builder credentials(String clientId, String username, String password) Sets the `clientId`, `username`, and `password` that will be used for authenticating with the IDP.This setting is required.
- Parameters:
clientId- client identifierusername- usernamepassword- password- Returns:
AwsCognitoIdpUserPasswordAuthenticationInterceptor.Builder
-
tokenStore
Sets the token storage mechanism to use. If not set, the default in-memory token storage will be used.This is an optional setting.
- Parameters:
tokenStore- token store- Returns:
AwsCognitoIdpUserPasswordAuthenticationInterceptor.Builder
-
disableStrictMode
Disables strict response code checking from the downstream service. When disabled, the interceptor will attempt to reauthenticate in the event of both 401 and 403 response codes. If left enabled (default), the interceptor will only attempt to reauthenticate in the event it receives a 401 response code from the downstream system.This is an optional setting.
-
build
Creates a new instance ofAwsCognitoIdpUserPasswordAuthenticationInterceptor.
-