A lot
This commit is contained in:
@@ -12,9 +12,7 @@
|
||||
</div>
|
||||
<template v-if="$store.state.msalAuth.isAdmin">
|
||||
<div class="alert alert-warning">
|
||||
<span>
|
||||
Tu esi administratorius.
|
||||
</span>
|
||||
<span> Tu esi administratorius. </span>
|
||||
</div>
|
||||
<h3>Prieigos raktas (Access token)</h3>
|
||||
<a
|
||||
@@ -59,7 +57,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import { authAxios } from '@/axios'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -70,31 +68,23 @@ export default {
|
||||
methods: {
|
||||
serverVerify() {
|
||||
this.verificationResult = null
|
||||
axios
|
||||
.get('/api/AuthMetadata/authed', {
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.$store.state.msalAuth.idToken}`,
|
||||
},
|
||||
})
|
||||
.then(response => {
|
||||
authAxios
|
||||
.get('/api/AuthMetadata/authed')
|
||||
.then((response) => {
|
||||
this.verificationResult = response.data
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
alert(error)
|
||||
})
|
||||
},
|
||||
serverAdminVerify() {
|
||||
this.verificationResult = null
|
||||
axios
|
||||
.get('/api/AuthMetadata/Admin', {
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.$store.state.msalAuth.idToken}`,
|
||||
},
|
||||
})
|
||||
.then(response => {
|
||||
authAxios
|
||||
.get('/api/AuthMetadata/Admin')
|
||||
.then((response) => {
|
||||
this.verificationResult = response.data
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
alert(error)
|
||||
})
|
||||
},
|
||||
|
Reference in New Issue
Block a user