openapi-first icon indicating copy to clipboard operation
openapi-first copied to clipboard

oauth example

Open javadch opened this issue 6 years ago • 3 comments

Can you please provide an example that includes the use of oauth in the spec (and in the code).

javadch avatar May 03 '19 13:05 javadch

Hi @javadch. Speaking about oauth2, we currently provide an operation middleware for oauth2 scopes authorization. It can be used for already authenticated requests when you have set oauth scopes on the path (e.g. by some prior middleware on express stack) that can be reached from req (e.g. req.user.grantedScopes or req.headers['x-oauth-scopes']).

Please let me know if it is what you are looking for and I would love to provide an example of oauth scopes authorization.

kiebzak avatar May 05 '19 14:05 kiebzak

Thanks @kiebzak. It would be very helpful to have the example and then talk on that if something else is needed.

javadch avatar May 05 '19 15:05 javadch

look at exegesis as an example.

javadch avatar May 13 '19 18:05 javadch