Merge branch 'master' into master
This commit is contained in:
2
dist/swagger-ui-standalone-preset.js.map
vendored
2
dist/swagger-ui-standalone-preset.js.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA8QA;AAmvGA;AAuxFA;;;;;;AAocA;AAkvFA;AAu+CA;AAo+CA;AAgrCA;AAuyEA","sourceRoot":""}
|
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA+PA;AAyiGA;AAwxFA;;;;;;AA0bA;AAkvFA;AAu+CA;AAo+CA;AAgrCA;AAgyEA","sourceRoot":""}
|
||||||
@@ -81,7 +81,7 @@ export const authorizePassword = ( auth ) => ( { authActions } ) => {
|
|||||||
if ( passwordType === "basic") {
|
if ( passwordType === "basic") {
|
||||||
headers.Authorization = "Basic " + btoa(username + ":" + password)
|
headers.Authorization = "Basic " + btoa(username + ":" + password)
|
||||||
} else {
|
} else {
|
||||||
Object.assign(form, {username}, {password})
|
Object.assign(form, {username}, {password})
|
||||||
|
|
||||||
if ( passwordType === "query") {
|
if ( passwordType === "query") {
|
||||||
if ( clientId ) {
|
if ( clientId ) {
|
||||||
@@ -91,7 +91,7 @@ export const authorizePassword = ( auth ) => ( { authActions } ) => {
|
|||||||
query.client_secret = clientSecret
|
query.client_secret = clientSecret
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Object.assign(form, {client_id: clientId}, {client_secret: clientSecret})
|
headers.Authorization = "Basic " + btoa(clientId + ":" + clientSecret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,14 +100,15 @@ export const authorizePassword = ( auth ) => ( { authActions } ) => {
|
|||||||
|
|
||||||
export const authorizeApplication = ( auth ) => ( { authActions } ) => {
|
export const authorizeApplication = ( auth ) => ( { authActions } ) => {
|
||||||
let { schema, scopes, name, clientId, clientSecret } = auth
|
let { schema, scopes, name, clientId, clientSecret } = auth
|
||||||
|
let headers = {
|
||||||
|
Authorization: "Basic " + btoa(clientId + ":" + clientSecret)
|
||||||
|
}
|
||||||
let form = {
|
let form = {
|
||||||
grant_type: "client_credentials",
|
grant_type: "client_credentials",
|
||||||
client_id: clientId,
|
|
||||||
client_secret: clientSecret,
|
|
||||||
scope: scopes.join(scopeSeparator)
|
scope: scopes.join(scopeSeparator)
|
||||||
}
|
}
|
||||||
|
|
||||||
return authActions.authorizeRequest({body: buildFormData(form), name, url: schema.get("tokenUrl"), auth })
|
return authActions.authorizeRequest({body: buildFormData(form), name, url: schema.get("tokenUrl"), auth, headers })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const authorizeAccessCode = ( { auth, redirectUrl } ) => ( { authActions } ) => {
|
export const authorizeAccessCode = ( { auth, redirectUrl } ) => ( { authActions } ) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user