I want to add the oauth2 authentication to my web API so i have created a spec with securitydefinitions:
"securityDefinitions": {
"OauthSecurity": {
"type": "oauth2",
"authorizationUrl": "http://localhost/oauth/dialog",
"flow": "implicit",
"scopes": {
"admin": "Admin scope",
"user": "User scope",
"media": "Media scope"
}
}
},
"security": [
{
"OauthSecurity": [
"user"
]
}
],
so it generated me some annotations on my API:
@io.swagger.annotations.Authorization(value = "OauthSecurity", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "user", description = "User scope")
})
So how do i continue now? I still can acces (curl without any headers or tokens or whatsover) my API without any trouble at all.
Sure i can create the auth endpdoint but i somehow miss the link between the generated API and oauth.