@@ -269,16 +269,27 @@ Add `swagger-auth.min.js` at the end of the body
269269 angular
270270 .module (' yourApp' , [' swaggerUi' , ' swaggerUiAuthorization' ])
271271 // what is below is required for oauth2 flows 'implicit' and 'accessCode' (ie. authorizationCode)
272+ // what is below can also be used to initialize apiKey or Basic authorizations
272273 .config (function (swaggerUiAuthProvider ) {
273274 swaggerUiAuthProvider .credentials ({
275+ // optional
276+ apiKey: {
277+ yourApiKeyName: ' yourApiKeyValue' // optional, can be used to initialize api key value
278+ },
279+ // optional
280+ basic: {
281+ login: ' yourLogin' , // optional, can be used to initialize basic login
282+ password: ' yourPassword' // optional, can be used to initialize basic password
283+ },
284+ // what is below is required for oauth2 flows 'implicit' and 'accessCode' (ie. authorizationCode)
274285 oauth2: {
275286 clientId: ' yourClientId' , // optional, can be used to initialize oauth2 credentials
276287 clientSecret: ' yourClientSecret' , // optional, can be used to initialize oauth2 credentials
277288 login: ' yourLogin' , // optional, can be used to initialize oauth2 or basic credentials
278289 password: ' yourPassword' , // optional, can be used to initialize oauth2 or basic credentials
279290 apiKey: ' yourApiKey' , // optional, can be used to initialize API key credentials
280- redirectUrl: ' yourPathToAngularSwaggerUI/oauth2-redirect.html' // required for oauth2 flow 'implicit' and 'accessCode' (ie. authorizationCode)
281- }
291+ redirectUrl: ' yourPathToAngularSwaggerUI/oauth2-redirect.html' // required for oauth2 flow 'implicit' and 'accessCode' (ie. authorizationCode)
292+ },
282293 });
283294 })
284295 ...
0 commit comments