fix most lint errors
This commit is contained in:
@@ -34,12 +34,11 @@ export default function authorize ( auth, authActions, errActions, configs ) {
|
|||||||
+ "&state=" + encodeURIComponent(state)
|
+ "&state=" + encodeURIComponent(state)
|
||||||
+ "&client_id=" + encodeURIComponent(clientId)
|
+ "&client_id=" + encodeURIComponent(clientId)
|
||||||
|
|
||||||
console.log(flow);
|
|
||||||
if (flow === "application") {
|
if (flow === "application") {
|
||||||
fetch(schema.get("tokenUrl"), {
|
fetch(schema.get("tokenUrl"), {
|
||||||
method: 'post', headers: {
|
method: "post", headers: {
|
||||||
'Accept':'application/json, text/plain, */*',
|
"Accept":"application/json, text/plain, */*",
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
},
|
},
|
||||||
body: "grant_type=client_credentials" +
|
body: "grant_type=client_credentials" +
|
||||||
"&client_id=" + encodeURIComponent(clientId) +
|
"&client_id=" + encodeURIComponent(clientId) +
|
||||||
@@ -49,12 +48,12 @@ export default function authorize ( auth, authActions, errActions, configs ) {
|
|||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
response.json()
|
response.json()
|
||||||
.then(function (json){
|
.then(function (json){
|
||||||
authActions.authorizeOauth2( { auth, token: json } );
|
authActions.authorizeOauth2({ auth, token: json })
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch (function (error) {
|
.catch (function (error) {
|
||||||
console.log('POST Request failed', error);
|
console.log("POST Request failed", error)
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
// pass action authorizeOauth2 and authentication data through window
|
// pass action authorizeOauth2 and authentication data through window
|
||||||
// to authorize with oauth2
|
// to authorize with oauth2
|
||||||
|
|||||||
Reference in New Issue
Block a user