mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-10 04:19:37 +00:00
#123 add some comments
This commit is contained in:
@@ -11,12 +11,16 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
# enable authentication and require the "uid" scope for this endpoint
|
||||
- oauth2: ['uid']
|
||||
|
||||
securityDefinitions:
|
||||
oauth2:
|
||||
type: oauth2
|
||||
flow: implicit
|
||||
authorizationUrl: https://example.com/oauth2/dialog
|
||||
# the token info URL is hardcoded for our mock_tokeninfo.py script
|
||||
# you can also pass it as an environment variable HTTP_TOKENINFO_URL
|
||||
x-tokenInfoUrl: http://localhost:7979/tokeninfo
|
||||
scopes:
|
||||
uid: Unique identifier of the user accessing the service.
|
||||
|
||||
@@ -5,6 +5,7 @@ Mock OAuth2 token info
|
||||
|
||||
import connexion
|
||||
|
||||
# our hardcoded mock "Bearer" access tokens
|
||||
TOKENS = {'123': 'jdoe',
|
||||
'456': 'rms'}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ paths:
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description:
|
||||
description: Token info object
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user