Giter Site home page Giter Site logo

oauth2test's Introduction

AeroGear OAuth2 Adapter sample test thing

you need to run this on a server so the quickest way is,

python -m SimpleHTTPServer

then go to http://localhost:8000

Currently this will test against the Google OAuth2 api's. i've created a sample app and turned on the calendar and google+ api's

The index page will not show much, so open up dev tools to see the console output.

UPDATE:

i've add a pipe with an "Authorizer"( this is a new setting ),

a pipe.read basically just wraps the callService method( which i've renamed to read )

Current Flow

The code will attempt to call callService , if there is no token, or the token has expired, then the authoriztion URL will be in the error callback. You would then use this to get an access token.

You execute this somehow, and then take that response URL and pass it to the validate method.

If a validationURLEnpoint is specified when creating the object, then that will be called and that response will be returned, if not, the parsed query string is returned as an object.

both ways store the access token in local storage

for now i'm just pasting this into the browser and then copying the location bar once it's returned and setting the responseFromAuthEndpoint variable from the console then calling validate

With the valid access token stored, make the call to the callService method again

oauth2test's People

Contributors

lholmquist avatar

Watchers

 avatar  avatar  avatar

Forkers

sebastienblanc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.