An ActionScript 3 library for interfacing with OAuth 2.0 services.
Latest commit 285ca02 Nov 7, 2014 @charlesbihis Merge pull request #5 from marcorei/master
Thanks, Markus!
Failed to load latest commit information.
libs Using new logging framework to remove dependencies on Flex framework.… May 23, 2012
.actionScriptProperties Adding new constant class for various OAuth 2 constant terms Jan 24, 2013
.flexLibProperties Adding stub for test class. May 30, 2013
.gitignore Initial commit for ActionScript OAuth2 Library. Dec 15, 2011
.project Initial commit for ActionScript OAuth2 Library. Dec 15, 2011
LICENSE Adding LICENSE file Jul 24, 2013

ActionScript OAuth 2.0 Library

An ActionScript 3 library for interfacing with OAuth 2.0 services, implemented according to the OAuth 2.0 v2.15 specification.


This library is built for use with Flash/Flex/AIR projects to facilitate communication with OAuth 2.0 services. It provides mechanisms to authenticate against OAuth 2.0 servers using all standard authentication and authorization workflows.

This project was first mentioned in my blog post at


The ActionScript OAuth 2.0 Library supports the following features...




To use the library, simply drop in the SWC (or the source) into your project, along with the appropriate dependencies, and follow the usage below...

// set up our StageWebView object to use our visible stage
stageWebView.stage = stage;

// set up the call
var oauth2:OAuth2 = new OAuth2("", "", LogSetupLevel.ALL);
var grant:IGrantType = new AuthorizationCodeGrant(stageWebView,                     // the StageWebView object for which to display the user consent screen
                                                  "INSERT_CLIENT_ID_HERE",          // your client ID
                                                  "INSERT_CLIENT_SECRET_HERE",      // your client secret
                                                  "INSERT_REDIRECT_URI_HERE",       // your redirect URI
                                                  "INSERT_SCOPE_HERE",              // (optional) your scope
                                                  "INSERT_STATE_HERE");             // (optional) your state

// make the call
oauth2.addEventListener(GetAccessTokenEvent.TYPE, onGetAccessToken);

function onGetAccessToken(getAccessTokenEvent:GetAccessTokenEvent):void
    if (getAccessTokenEvent.errorCode == null && getAccessTokenEvent.errorMessage == null)
        // success!
        trace("Your access token value is: " + getAccessTokenEvent.accessToken);
        // fail :(
}  // onGetAccessToken



You can find the full ASDocs for the project here.



The ActionScript OAuth 2.0 Library is licensed under the Apache License, Version 2.0.