Search in sources :

Example 11 with ApiAuthProviders

use of com.amplifyframework.api.aws.ApiAuthProviders in project amplify-android by aws-amplify.

the class AuthRuleRequestDecoratorTest method setup.

/**
 * Sets up the test.
 */
@Before
public void setup() {
    ApiAuthProviders authProviders = ApiAuthProviders.builder().cognitoUserPoolsAuthProvider(new FakeCognitoAuthProvider()).oidcAuthProvider(new FakeOidcAuthProvider()).build();
    decorator = new AuthRuleRequestDecorator(authProviders);
}
Also used : ApiAuthProviders(com.amplifyframework.api.aws.ApiAuthProviders) Before(org.junit.Before)

Aggregations

ApiAuthProviders (com.amplifyframework.api.aws.ApiAuthProviders)11 Request (okhttp3.Request)9 Test (org.junit.Test)9 ApiException (com.amplifyframework.api.ApiException)3 Context (android.content.Context)1 Log (android.util.Log)1 RawRes (androidx.annotation.RawRes)1 ApplicationProvider.getApplicationContext (androidx.test.core.app.ApplicationProvider.getApplicationContext)1 CognitoJWTParser (com.amazonaws.mobileconnectors.cognitoidentityprovider.util.CognitoJWTParser)1 AmplifyException (com.amplifyframework.AmplifyException)1 ApiCategory (com.amplifyframework.api.ApiCategory)1 AWSApiPlugin (com.amplifyframework.api.aws.AWSApiPlugin)1 AuthModeStrategyType (com.amplifyframework.api.aws.AuthModeStrategyType)1 AuthorizationType (com.amplifyframework.api.aws.AuthorizationType)1 DefaultCognitoUserPoolsAuthProvider (com.amplifyframework.api.aws.sigv4.DefaultCognitoUserPoolsAuthProvider)1 AuthCategory (com.amplifyframework.auth.AuthCategory)1 AWSCognitoAuthPlugin (com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin)1 AuthSignOutOptions (com.amplifyframework.auth.options.AuthSignOutOptions)1 AuthSignInResult (com.amplifyframework.auth.result.AuthSignInResult)1 Amplify (com.amplifyframework.core.Amplify)1