summaryrefslogtreecommitdiff
path: root/yarns/900-local.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-08-01 13:48:44 +0300
committerLars Wirzenius <liw@liw.fi>2018-08-01 15:18:54 +0300
commit036a863b00fe079e13bb1640267078ec47e6f9e5 (patch)
tree8363e515b4716375aa723f6db37f05611e806399 /yarns/900-local.yarn
parentbfd3be221e51f9d140c68a40f72ce38ac3aad7ca (diff)
downloadqvisqve-036a863b00fe079e13bb1640267078ec47e6f9e5.tar.gz
Add: management API
Diffstat (limited to 'yarns/900-local.yarn')
-rw-r--r--yarns/900-local.yarn12
1 files changed, 5 insertions, 7 deletions
diff --git a/yarns/900-local.yarn b/yarns/900-local.yarn
index ddce8f8..8c9fd1d 100644
--- a/yarns/900-local.yarn
+++ b/yarns/900-local.yarn
@@ -60,13 +60,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
IMPLEMENTS GIVEN an access token for (\S+) with scopes (.+)
user = get_next_match()
scopes = get_next_match()
- key = open('token.key').read()
- argv = [
- os.path.join(srcdir, 'create-token'),
- scopes,
- ]
- token = cliapp.runcmd(argv, feed_stdin=key)
- store_token(user, token)
+ key = V['privkey']
+ issuer = V['iss']
+ audience = V['aud']
+ token = create_token(key, issuer, audience, scopes)
+ V['token'] = token
## Start Qvisqve