From 744f363c6627207cef30bc57b0611c12c410311b Mon Sep 17 00:00:00 2001 From: Ian Young Date: Thu, 10 Apr 2014 12:24:20 -0700 Subject: [PATCH 1/5] Function to perform flow in same window --- src/js/angularOauth.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/js/angularOauth.js b/src/js/angularOauth.js index fb3c013..52fa055 100644 --- a/src/js/angularOauth.js +++ b/src/js/angularOauth.js @@ -76,6 +76,11 @@ angular.module('angularOauth', []). } }; + var buildAuthorizationUrl = function(extraParams) { + var params = angular.extend(getParams(), extraParams); + return config.authorizationEndpoint + '?' + objectToQueryString(params); + } + return { // TODO: get/set might want to support expiration to reauthenticate // TODO: check for localStorage support and otherwise perhaps use other methods of storing data (e.g. cookie) @@ -155,8 +160,7 @@ angular.module('angularOauth', []). }, popupOptions); var deferred = $q.defer(), - params = angular.extend(getParams(), extraParams), - url = config.authorizationEndpoint + '?' + objectToQueryString(params), + url = buildAuthorizationUrl(extraParams), resolved = false; var formatPopupOptions = function(options) { @@ -191,6 +195,10 @@ angular.module('angularOauth', []). // TODO: reject deferred if the popup was closed without a message being delivered + maybe offer a timeout return deferred.promise; + }, + getTokenInSameWindow: function(extraParams) { + var url = buildAuthorizationUrl(extraParams); + $window.location.href = url; } } } From f97c6513bd322a2d111c115f7e102bb48495ddff Mon Sep 17 00:00:00 2001 From: Fred Jonsson Date: Sun, 21 Sep 2014 19:39:57 +0000 Subject: [PATCH 2/5] Change README to request a new maintainer. --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 0a62add..1f2b172 100644 --- a/README.rst +++ b/README.rst @@ -4,6 +4,8 @@ About This project provides an implementation of a client-side (implicit grant) OAuth 2.0 authorization flow. +**Looking for a new maintainer! I've moved away from the Angular world, and I have not found the time to develop a stable, up-to-date, packageble and testable library for doing OAuth with Angular. If you feel like you have the time and interest to make this module more useful to the community, please be in touch at fridrik@pyth.net.** + Features ======== From ef16df70e2f8b3c265bcf30979c12c7a90fb29dd Mon Sep 17 00:00:00 2001 From: Fred Jonsson Date: Sun, 21 Sep 2014 19:40:42 +0000 Subject: [PATCH 3/5] Fix README "new maintainer" phrasing. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1f2b172..3192ef1 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ About This project provides an implementation of a client-side (implicit grant) OAuth 2.0 authorization flow. -**Looking for a new maintainer! I've moved away from the Angular world, and I have not found the time to develop a stable, up-to-date, packageble and testable library for doing OAuth with Angular. If you feel like you have the time and interest to make this module more useful to the community, please be in touch at fridrik@pyth.net.** +**Looking for a new maintainer! I've moved away from the Angular world, and I have not found the time to develop this project into a stable, up-to-date, packageble and testable library for doing OAuth with Angular. If you feel like you have the time and interest to make this module more useful to the community, please be in touch at fridrik@pyth.net.** Features From 0f377c979c1ea16bc14ed4c97256927b156c7132 Mon Sep 17 00:00:00 2001 From: Fred Jonsson Date: Wed, 17 Dec 2014 11:17:43 +0000 Subject: [PATCH 4/5] Remove notice looking for maintainer --- README.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.rst b/README.rst index 3192ef1..0ccbc4e 100644 --- a/README.rst +++ b/README.rst @@ -4,9 +4,6 @@ About This project provides an implementation of a client-side (implicit grant) OAuth 2.0 authorization flow. -**Looking for a new maintainer! I've moved away from the Angular world, and I have not found the time to develop this project into a stable, up-to-date, packageble and testable library for doing OAuth with Angular. If you feel like you have the time and interest to make this module more useful to the community, please be in touch at fridrik@pyth.net.** - - Features ======== From 1c1f4f1e8823229e27531b6865bbc67ff4725d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fri=C3=B0rik=20M=C3=A1r=20J=C3=B3nsson?= Date: Wed, 17 Dec 2014 20:52:33 +0000 Subject: [PATCH 5/5] Change bower metadata and README URLs due to repo transfer. --- README.rst | 2 +- component.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 0ccbc4e..e1463b4 100644 --- a/README.rst +++ b/README.rst @@ -36,7 +36,7 @@ Online Check out the demo by going to `example/demo.html via rawhithub.com`_. -.. _example/demo.html via rawhithub.com: https://rawgithub.com/enginous/angular-oauth/master/example/demo.html +.. _example/demo.html via rawhithub.com: https://rawgithub.com/angular-oauth/angular-oauth/master/example/demo.html Local diff --git a/component.json b/component.json index 5415b03..cc2ec68 100644 --- a/component.json +++ b/component.json @@ -4,9 +4,9 @@ "dependencies": { "angular": ">= 1.1.4" }, - "homepage": "https://github.com/enginous/angular-oauth", + "homepage": "https://github.com/angular-oauth/angular-oauth", "repository": { "type": "git", - "url": "git://github.com/enginous/angular-oauth.git" + "url": "git://github.com/angular-oauth/angular-oauth.git" } }