{"id":13743658,"url":"https://github.com/charlesbihis/actionscript-oauth2","last_synced_at":"2026-01-11T10:38:51.761Z","repository":{"id":2047210,"uuid":"2984705","full_name":"charlesbihis/actionscript-oauth2","owner":"charlesbihis","description":"An ActionScript 3 library for interfacing with OAuth 2.0 services.","archived":false,"fork":false,"pushed_at":"2022-03-17T08:06:45.000Z","size":526,"stargazers_count":110,"open_issues_count":2,"forks_count":28,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-15T14:35:43.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://charlesbihis.github.io/actionscript-oauth2/","language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charlesbihis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-15T01:40:35.000Z","updated_at":"2024-04-28T16:54:12.000Z","dependencies_parsed_at":"2022-08-28T21:10:24.958Z","dependency_job_id":null,"html_url":"https://github.com/charlesbihis/actionscript-oauth2","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesbihis%2Factionscript-oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesbihis%2Factionscript-oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesbihis%2Factionscript-oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesbihis%2Factionscript-oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charlesbihis","download_url":"https://codeload.github.com/charlesbihis/actionscript-oauth2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253174308,"owners_count":21865845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:00:54.605Z","updated_at":"2025-05-09T01:31:24.657Z","avatar_url":"https://github.com/charlesbihis.png","language":"ActionScript","readme":"# ActionScript OAuth 2.0 Library\n\nAn ActionScript 3 library for interfacing with OAuth 2.0 services, implemented according to the [OAuth 2.0 v2.15 specification](http://tools.ietf.org/html/draft-ietf-oauth-v2-15).\n\n## Overview\n\nThis 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.\n\nThis project was first mentioned in my blog post at http://blogs.adobe.com/charles/2012/05/oauth-2-0-library-for-actionscript.html.\n\n### Features\n\nThe ActionScript OAuth 2.0 Library supports the following features...\n\n* Ability to [fetch an access token](http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-4) via the OAuth 2.0 supported workflows...\n  * [Authorization Code Grant workflow](http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-4.1)\n  * [Implicit Grant workflow](http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-4.2)\n  * [Resource Owner Password Credentials workflow](http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-4.3)\n* Ability to [refresh an access token](http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-6)\n* Robust and adjustable logging\n* Ability to log in, view, and interact with the user consent page within a given StageWebView object \n\n### Dependencies\n\n* [as3corelib](https://github.com/mikechambers/as3corelib)\n* [as3commons-logging](http://code.google.com/p/as3-commons/)\n\n## Reference\n\n### Usage\n\nTo use the library, simply drop in the SWC (or the source) into your project, along with the appropriate dependencies, and follow the usage below...\n\n\t// set up our StageWebView object to use our visible stage\n\tstageWebView.stage = stage;\n\t \n\t// set up the call\n\tvar oauth2:OAuth2 = new OAuth2(\"https://accounts.google.com/o/oauth2/auth\", \"https://accounts.google.com/o/oauth2/token\", LogSetupLevel.ALL);\n\tvar grant:IGrantType = new AuthorizationCodeGrant(stageWebView,\t\t\t\t\t\t// the StageWebView object for which to display the user consent screen\n\t\t\t\t\t\t\t\t\t\t\t\t\t  \"INSERT_CLIENT_ID_HERE\",\t\t\t// your client ID\n\t\t\t\t\t\t\t\t\t\t\t\t\t  \"INSERT_CLIENT_SECRET_HERE\",\t\t// your client secret\n\t\t\t\t\t\t\t\t\t\t\t\t\t  \"INSERT_REDIRECT_URI_HERE\",\t\t// your redirect URI\n\t\t\t\t\t\t\t\t\t\t\t\t\t  \"INSERT_SCOPE_HERE\",\t\t\t\t// (optional) your scope\n\t\t\t\t\t\t\t\t\t\t\t\t\t  \"INSERT_STATE_HERE\");\t\t\t\t// (optional) your state\n\t \n\t// make the call\n\toauth2.addEventListener(GetAccessTokenEvent.TYPE, onGetAccessToken);\n\toauth2.getAccessToken(grant);\n\t \n\tfunction onGetAccessToken(getAccessTokenEvent:GetAccessTokenEvent):void\n\t{\n\t\tif (getAccessTokenEvent.errorCode == null \u0026\u0026 getAccessTokenEvent.errorMessage == null)\n\t\t{\n\t\t\t// success!\n\t\t\ttrace(\"Your access token value is: \" + getAccessTokenEvent.accessToken);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// fail :(\n\t\t}\n\t}  // onGetAccessToken\n\n### Demo\n\n* Demo description: http://blogs.adobe.com/charles/2012/05/oauth-2-0-library-for-actionscript.html\n* Demo source: https://github.com/charlesbihis/sandbox/tree/master/actionscript/actionscript-oauth2-mobile-demo\n\n### Documentation\n\nYou can find the full ASDocs for the project [here](http://charlesbihis.github.com/actionscript-oauth2/docs/).\n\n## Author\n\n* Created by Charles Bihis\n* Website: [www.whoischarles.com](http://www.whoischarles.com)\n* E-mail: [charles@whoischarles.com](mailto:charles@whoischarles.com)\n* Twitter: [@charlesbihis](http://www.twitter.com/charlesbihis)\n\n## License\n\nThe ActionScript OAuth 2.0 Library is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).","funding_links":[],"categories":["Networking"],"sub_categories":["Authentication"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesbihis%2Factionscript-oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesbihis%2Factionscript-oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesbihis%2Factionscript-oauth2/lists"}