added token managements

This commit is contained in:
Abdul Rifqi Al Abqary
2020-01-06 18:17:50 +09:00
parent 2a818dc81d
commit df48e85de5
3 changed files with 95 additions and 18 deletions

View File

@@ -87,7 +87,24 @@ export default {
request.bodyParams[index].value = value;
},
setOauth2({ oauth2 }, { attribute, value }) {
setOAuth2({ oauth2 }, { attribute, value }) {
oauth2[attribute] = value;
}
},
addOAuthToken({ oauth2 }, value) {
oauth2.tokens.push(value);
},
removeOAuthToken({ oauth2 }, index) {
oauth2.tokens.splice(index, 1);
},
setOAuthTokenName({ oauth2 }, { index, value }) {
oauth2.tokens[index].name = value;
},
setOAuthTokenValue({ oauth2 }, { index, value }) {
oauth2.tokens[index].value = value;
},
};

View File

@@ -24,7 +24,7 @@ export default () => ({
query: ""
},
oauth2: {
token: [],
tokens: [],
accessTokenName: "",
oidcDiscoveryUrl: "",
authUrl: "",