UI to access / refresh access token
This commit is contained in:
parent
30f6a77e68
commit
607e492952
|
@ -26,6 +26,14 @@
|
|||
<label for="copy-secret"><translate translate-context="Content/Applications/Label">Application secret</translate></label>
|
||||
<copy-input id="copy-secret" :value="application.client_secret" />
|
||||
</div>
|
||||
<div class="field" v-if="application.token != undefined">
|
||||
<label for="copy-secret"><translate translate-context="Content/Applications/Label">Access token</translate></label>
|
||||
<copy-input id="copy-secret" :value="application.token" />
|
||||
<a href="" @click.prevent="refreshToken">
|
||||
<i class="refresh icon"></i>
|
||||
<translate translate-context="Content/Applications/Label">Regenerate token</translate>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="ui header">
|
||||
<translate translate-context="Content/Applications/Title">Edit application</translate>
|
||||
|
@ -68,6 +76,12 @@ export default {
|
|||
self.errors = error.backendErrors
|
||||
})
|
||||
},
|
||||
async refreshToken () {
|
||||
self.isLoading = true
|
||||
let response = await axios.post(`oauth/apps/${this.id}/refresh-token`)
|
||||
this.application = response.data
|
||||
self.isLoading = false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
labels() {
|
||||
|
|
Loading…
Reference in New Issue