This commit is contained in:
2018-11-14 18:19:59 +00:00
parent e4991bdade
commit 06312793a9
7 changed files with 31 additions and 19 deletions

View File

@@ -44,12 +44,14 @@
</v-container>
</v-content>
<v-footer color="indigo" app>
<span class="white--text">&copy; 2017</span>
<span class="white--text">{{ version() }}</span>
<span class="white--text">{{ copyright() }}</span>
</v-footer>
</v-app>
</template>
<script>
import aboutInfo from "./utils/aboutinfo";
export default {
name: "App",
data() {
@@ -79,6 +81,12 @@ export default {
},
navItems() {
return this.$store.state.navItems;
},
copyright() {
return aboutInfo.copyright;
},
version() {
return aboutInfo.version;
}
},
props: {

View File

@@ -19,5 +19,8 @@ export default {
"Content-Type": "application/json",
Authorization: "Bearer " + store.state.apiToken
};
},
APIUrl() {
return store.state.apiUrl;
}
};

View File

@@ -1,10 +1,9 @@
import config from "../utils/config";
import api from "./apiutil";
import apiUtil from "./apiutil";
import { processLogin, processLogout } from "../utils/authutil";
export default {
async authenticate(login, password) {
return fetch(config.apiUrl + "auth", {
return fetch(apiUtil.APIUrl + "auth", {
method: "post",
mode: "cors",
headers: {
@@ -16,8 +15,8 @@ export default {
password: password
})
})
.then(api.status)
.then(api.json)
.then(apiUtil.status)
.then(apiUtil.json)
.then(processLogin)
.then(() => {
return Promise.resolve(true);

View File

@@ -1,7 +1,6 @@
/* xeslint-disable */
import store from "../store";
import config from "../utils/config";
import api from "./apiutil";
import apiUtil from "./apiutil";
import _ from "../utils/libs/core.min.js";
export default {
@@ -24,14 +23,14 @@ export default {
resolve();
return;
}
fetch(config.apiUrl + "locale/subset", {
fetch(apiUtil.APIUrl + "locale/subset", {
method: "post",
mode: "cors",
headers: api.AuthorizedHeaders(),
headers: apiUtil.AuthorizedHeaders(),
body: JSON.stringify(NeedIt)
})
.then(api.status)
.then(api.json)
.then(apiUtil.status)
.then(apiUtil.json)
.then(response => {
_.forEach(response.data, function(item) {
store.commit("addLocaleText", item);

View File

@@ -0,0 +1,5 @@
export default {
version: "AyaNova 8.1.0 Alpha",
copyright:
"Copyright © 1999-2018, Ground Zero Tech-Works Inc. All Rights Reserved"
};

View File

@@ -1,6 +0,0 @@
export default {
apiUrl: "http://localhost:7575/api/v8.0/",
apiToken: "",
userId: 0,
roles: 0
};

View File

@@ -3,4 +3,8 @@
## TODO
- Need core dlToken route for not just attachments
- There should be a notification for ops if a file attachment is physically not found when it has a db record see Attachmentcontroller line 407
- There should be a notification for ops if a file attachment is physically not found when it has a db record see Attachmentcontroller line 407
Download / upload security JWT info:
https://stackoverflow.com/questions/29452031/how-to-handle-file-downloads-with-jwt-based-authentication/43133108#43133108
https://stackoverflow.com/questions/45763149/asp-net-core-jwt-in-uri-query-parameter/53295042