Permalink
Browse files

feat(test): add custom _provider and _scheme for basic fixture

  • Loading branch information...
pi0 committed Apr 2, 2018
1 parent b7998c6 commit 7423e778f12fab9d722f29f571f8b04e05b462ad
@@ -0,0 +1,3 @@
module.exports = function test (scheme) {
scheme._with_test_provider = true
}
@@ -0,0 +1,11 @@
export default class LocalScheme {
constructor (auth, options) {
this.$auth = auth
this.name = options._name
}
mounted () {
// eslint-disable-next-line no-console
console.log('Mounted test provider: ' + this.name)
}
}
@@ -13,6 +13,10 @@ module.exports = {
endpoints: {
login: { propertyName: 'token.accessToken' }
}
},
test: {
_provider: '~/auth/test-provider.js',
_scheme: '~/auth/test-scheme.js'
}
}
},
@@ -1,5 +1,6 @@
<template>
<div>
{{ $auth.$state.loggedIn ? 'Logged In' : 'Guest' }}
<pre v-if="$auth.loggedIn" v-html="$auth.user"></pre>
<div v-else>Please login</div>
</div>
</template>

0 comments on commit 7423e77

Please sign in to comment.