AwsInterceptor | AWS Gateway OkHttp Interceptor

 by   Ghedeon Kotlin Version: 0.7 License: No License

kandi X-RAY | AwsInterceptor Summary

kandi X-RAY | AwsInterceptor Summary

AwsInterceptor is a Kotlin library. AwsInterceptor has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

AwsInterceptor
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              AwsInterceptor has a low active ecosystem.
              It has 21 star(s) with 4 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 8 have been closed. On average issues are closed in 382 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of AwsInterceptor is 0.7

            kandi-Quality Quality

              AwsInterceptor has 0 bugs and 1 code smells.

            kandi-Security Security

              AwsInterceptor has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              AwsInterceptor code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              AwsInterceptor does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              AwsInterceptor releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 85 lines of code, 9 functions and 2 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of AwsInterceptor
            Get all kandi verified functions for this library.

            AwsInterceptor Key Features

            No Key Features are available at this moment for AwsInterceptor.

            AwsInterceptor Examples and Code Snippets

            No Code Snippets are available at this moment for AwsInterceptor.

            Community Discussions

            QUESTION

            How can I get AWS Cognito login/logout to work properly with AWS API Gateway on Android?
            Asked 2018-Apr-24 at 14:17

            I'm writing a simple Android app that currently offers the following features:

            1. Register/login with email and password, against an AWS Cognito back end
            2. Logout (against the same Cognito back end)
            3. Call a protected web API on AWS API Gateway

            I'm building my own very simple login/logout UI, rather than using the AWS Cognito UI library:

            Login screen (left); logged-in screen (right)

            The web API should return 200 (and a body) when the user is logged in, and a 403 error when they are logged out. The server setup all appears to be correct, and an equivalent app on iOS is working as described.

            The problem on Android is as follows:

            • When I start the app, don't log in, and call the API: I get a 403 error (expected).
            • When I log in and call the API again: I still get a 403 error (unexpected).
            • When I close the app, swipe it from the recent apps list, and re-open it: I'm still logged in (expected)
            • Now when I call the API: I get a 200 response (expected).

            The same happens now if I log out: I still get a 200 response after logging out until I kill the app and restart it.

            How can I get the API Gateway call to respect my current authentication state immediately, without recycling the app?

            I wondered if the AWS API Gateway Android library might be to blame, so I've tried an alternative implementation using OkHttp but I get exactly the same result. I've based my Cognito code on the AmazonCognitoYourUserPools demo.

            Here's the part of my build.gradle that imports the AWS libraries:

            ...

            ANSWER

            Answered 2018-Apr-24 at 14:17

            The solution my colleague and I have arrived at is as follows:

            Login

            After login, you need to re-initialise the AWSMobileClient before you call any API Gateway endpoints. Here's a snippet from my AuthenticationHandler in LoginActivity.java:

            Source https://stackoverflow.com/questions/49917929

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install AwsInterceptor

            Add awsinterceptor as a dependency to your build.gradle file.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Ghedeon/AwsInterceptor.git

          • CLI

            gh repo clone Ghedeon/AwsInterceptor

          • sshUrl

            git@github.com:Ghedeon/AwsInterceptor.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link