strongloop / loopback-component-oauth2

oAuth 2.0 server for LoopBack
http://www.strongloop.com
Other
62 stars 63 forks source link

Is it possible to change Authorization Header name ? #32

Closed sh8 closed 8 years ago

sh8 commented 9 years ago

I wanna authenticate user like,

GET /protected/protected-apis.html HTTP/1.1
Host: localhost:3001
X-Dummy-API-Key: Bearer cdtXRlBcXBSWrdc6vZbCFGiq3ZUhl0B

Please tell me the way to change Authorization Header name.

loay commented 8 years ago

@shun3475 I am not sure if I got what you meant but do you customized token generation? Here from the documentation:

Custom functions for token generation

generateToken: function(options) returns a token string getTTL: function(grantType, clientId, resourceOwner, scopes) returns a ttl number in seconds

If you meant the endpoints?

oauth2.authenticate(['/protected', '/api', '/me'],
  {session: false, scope: 'email'});
loay commented 8 years ago

Closing this issue for now. If you are still running into problems, feel free to leave a comment and I will reopen the issue. closes#32