Skip to content

Commit

Permalink
Fix authentication issues
Browse files Browse the repository at this point in the history
  • Loading branch information
diocas committed Jul 29, 2022
1 parent b2d9b70 commit 7468465
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ifc-js/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
</template>

<script>
import { mapGetters } from 'vuex'
import {
AmbientLight,
AxesHelper,
Expand Down Expand Up @@ -40,6 +42,9 @@ export default {
this.addIFCModel()
this.animate()
},
computed: {
...mapGetters('runtime/auth', ['publicLinkPassword', 'accessToken']),
},
methods: {
init: function () {
const threeCanvas = document.getElementById('threeCanvas')
Expand Down
2 changes: 2 additions & 0 deletions rootjs/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<script>
import 'https://root.cern/js/latest/scripts/JSRoot.core.min.js'
import { getFileUrl, getHeadersWithAuth } from '../../common/fileAccess.js'
import { mapGetters } from 'vuex'
export default {
name: 'ROOTJSViewer',
Expand All @@ -33,6 +34,7 @@ export default {
isPublic: false
}),
computed: {
...mapGetters('runtime/auth', ['publicLinkPassword', 'accessToken']),
rootFile() {
const headers = getHeadersWithAuth(this.isPublic, this.accessToken, this.publicLinkPassword)
return fetch(this.url, { headers }).then((resp) => {
Expand Down

0 comments on commit 7468465

Please sign in to comment.