Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorization input box is not showing in rest-hapi API swagger UI #77

Closed
ghost opened this issue Nov 13, 2017 · 3 comments
Closed

Authorization input box is not showing in rest-hapi API swagger UI #77

ghost opened this issue Nov 13, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 13, 2017

hapi1

Context

my package.json is look like

"rest-hapi": "0.23.2",
 "hapi": "^15.2.0",
"hapi-auth-bearer-token": "^3.1.1",
"hapi-auth-jwt2": "^7.2.4",
"hapi-passport": "0.0.6",
"hapi-swagger": "^2.2.4",
  • hapi-swgger version: "hapi-swagger": "^2.2.4",

all the api is creating automatically..so i don`t have any idea how can set Authorization in every api which is created automatically

i am using "rest-hapi": "0.23.2"

please give me solution

@JKHeadley
Copy link
Owner

hi @shashwat78, you have to define an authorization strategy and then set RestHapi.config.authStrategy to the name of the strategy that you have defined. You can check out appy for an example.

@ghost
Copy link
Author

ghost commented Nov 14, 2017 via email

@JKHeadley
Copy link
Owner

hapi-auth-jwt2 is your authentication scheme. You now have to define an authentication strategy to implement the hapi-auth-jwt2 scheme. You can see an example here or in the hapi-auth-jwt2 docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant