z0mt3c / hapi-swaggered

Yet another hapi plugin providing swagger compliant API specifications based on routes and joi schemas to be used with swagger-ui.
MIT License
82 stars 38 forks source link

Support authorizations #2

Closed z0mt3c closed 9 years ago

z0mt3c commented 10 years ago

Swagger specs: https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#514-authorizations-object

May just through plugin configuration? Or hapi routes auth configuration?

z0mt3c commented 10 years ago

Only "oauth2" will be visualized in swagger-ui :-1:

https://github.com/wordnik/swagger-ui/blob/e04b756521e8363554b546ffe13be271fb6e9f4b/src/main/coffeescript/view/OperationView.coffee#L50

Example structure of route.settings.auth

{ strategies: [ 'strategy' ],
  scope: [ 'DO:NOTHING' ],
  mode: 'required',
  payload: false }
z0mt3c commented 9 years ago

Maybe later... for now no solution