Skip to content

Commit ddfc0ac

Browse files
Merge pull request #57 from raymondelferink/master
Added changes again to support Authorization Code flow.
2 parents 6947b1c + 1f603d4 commit ddfc0ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: dist/oauth-ng.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ endpointClient.factory('Endpoint', function(AccessToken, $location) {
207207

208208
url = params.site +
209209
params.authorizePath +
210-
appendChar + 'response_type=token&' +
210+
appendChar + 'response_type='+params.responseType+'&' +
211211
'client_id=' + encodeURIComponent(params.clientId) + '&' +
212212
'redirect_uri=' + encodeURIComponent(params.redirectUri) + '&' +
213213
'scope=' + oAuthScope + '&' +
@@ -306,6 +306,7 @@ directives.directive('oauth', function(AccessToken, Endpoint, Profile, $location
306306
site: '@', // (required) set the oauth server host (e.g. http://oauth.example.com)
307307
clientId: '@', // (required) client id
308308
redirectUri: '@', // (required) client redirect uri
309+
responseType: '@', // (optional) response type, defaults to token (use 'token' for implicit flow and 'code' for authorization code flow
309310
scope: '@', // (optional) scope
310311
profileUri: '@', // (optional) user profile uri (e.g http://example.com/me)
311312
template: '@', // (optional) template to render (e.g bower_components/oauth-ng/dist/views/templates/default.html)

0 commit comments

Comments
 (0)