2019-12-26 11:46:21 +01:00
|
|
|
<template lang='pug'>
|
2022-11-04 12:22:21 +01:00
|
|
|
v-form.d-flex.justify-space-around(method='post' action='/oauth/authorize')
|
2022-07-01 15:55:09 +02:00
|
|
|
v-card.mt-5(max-width='600px')
|
|
|
|
v-card-title {{settings.title}} - {{$t('common.authorize')}}
|
|
|
|
v-card-text
|
2022-11-04 12:22:21 +01:00
|
|
|
h2 {{$auth.user.email}}
|
|
|
|
input(name='transaction_id' :value='transactionID' type='hidden')
|
2022-07-01 15:55:09 +02:00
|
|
|
u {{$auth.user.email}}
|
2022-11-04 12:22:21 +01:00
|
|
|
|
2022-07-01 15:55:09 +02:00
|
|
|
div
|
2022-11-04 12:22:21 +01:00
|
|
|
p(v-html="$t('oauth.authorization_request', { app: client, instance_name: settings.title })")
|
2022-07-01 15:55:09 +02:00
|
|
|
ul.mb-2
|
2022-11-04 12:22:21 +01:00
|
|
|
li {{$t(`oauth.scopes.${scope}`)}}
|
|
|
|
span(v-html="$t('oauth.redirected_to', {url: redirect_uri})")
|
2022-07-01 15:55:09 +02:00
|
|
|
v-card-actions
|
|
|
|
v-spacer
|
2022-11-04 12:22:21 +01:00
|
|
|
v-btn(color='error' to='/' outlined) {{$t('common.cancel')}}
|
|
|
|
v-btn(type='submit' color='success' outlined) {{$t('common.authorize')}}
|
2019-12-26 11:46:21 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-01-21 01:24:10 +01:00
|
|
|
import { mapState } from 'vuex'
|
2019-12-26 11:46:21 +01:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'Authorize',
|
2021-03-11 12:28:50 +01:00
|
|
|
layout: 'modal',
|
2019-12-26 11:46:21 +01:00
|
|
|
middleware: ['auth'],
|
2020-01-21 01:24:10 +01:00
|
|
|
async asyncData ({ $axios, query, error, req }) {
|
2022-11-04 12:22:21 +01:00
|
|
|
const { transactionID, client, scope, redirect_uri } = query
|
|
|
|
return { transactionID, client, redirect_uri, scope }
|
2019-12-26 11:46:21 +01:00
|
|
|
},
|
2022-11-04 12:22:21 +01:00
|
|
|
computed: mapState(['settings']),
|
2020-01-15 23:42:44 +01:00
|
|
|
head () {
|
|
|
|
return { title: `${this.settings.title} - Authorize` }
|
|
|
|
}
|
2019-12-26 11:46:21 +01:00
|
|
|
}
|
2022-11-04 12:22:21 +01:00
|
|
|
</script>
|