Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Add oauth2 password flow #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Add `openapi3-converter.min.js` at the end of the body
```

#### Enable authorization
`oauth` is not implemented, only `basic` and `API key` authorizations are implemented.
`oauth` is partially implemented with password flow, and `basic` and `API key` authorizations are implemented.
Add `swagger-auth.min.js` at the end of the body
```html
<body>
Expand All @@ -280,16 +280,16 @@ Add `swagger-auth.min.js` at the end of the body
swaggerUiAuthProvider.configuration({
// required for oauth2 flow 'implicit' and 'accessCode' (ie. authorizationCode)
redirectUrl: 'yourPathToAngularSwaggerUI/oauth2-redirect.html'
// optional
// optional, must match one of your swagger authentication method
yourSecurityName: {
apiKey: 'yourApiKeyValue' // optional, can be used to initialize api key value
},
// optional
// optional, must match one of your swagger authentication method
yourSecurityName: {
login: 'yourLogin', // optional, can be used to initialize basic login
password: 'yourPassword' // optional, can be used to initialize basic password
},
// optional
// optional, must match one of your swagger authentication method
yourSecurityName: {
clientId: 'yourClientId', // optional, can be used to initialize oauth2 credentials
clientSecret: 'yourClientSecret', // optional, can be used to initialize oauth2 credentials
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/scripts/modules/swagger-auth.min.js

Large diffs are not rendered by default.

Loading