-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add support for security #68
Labels
Comments
I have idea and create now. // @securityDefinitions.basic BasicAuth
// @securityDefinitions.apiKey ApiKeyAuth
// @in header
// @name Authorization
// @securityDefinitions.oauth2 OAuth2
// @flow accessCode
// @name Authorization
// @authorizationUrl https://example.com/oauth/authorize
// @tokenUrl https://example.com/oauth/token
// @scopes.read Grants read access
// @scopes.write Grants write access
// @scopes.admin Grants read and write access to administrative information |
I want. {
"security": [
{
"OAuth2Password": [
"write",
"read"
]
},
{
"BasicAuth": []
}
]
} |
// AddAccount godoc
// @Summary Add a account
// @Description add by json account
// @Accept json
// @Produce json
// @Param account body model.AddAccount true "Add account"
// @Success 200 {object} model.Account
// @Failure 400 {object} controller.HTTPError
// @Failure 404 {object} controller.HTTPError
// @Failure 500 {object} controller.HTTPError
// @Security OAuth2Password[read, write]
// @Security BasicAuth
// @Router /accounts [post] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://swagger.io/docs/specification/2-0/authentication/
The text was updated successfully, but these errors were encountered: