From 89cc8f3239f824755d9d19b3b5877ff62900b787 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 5 Nov 2017 12:57:22 +0100 Subject: Refactor: change token generation to name the user --- yarns/900-remote.yarn | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'yarns/900-remote.yarn') diff --git a/yarns/900-remote.yarn b/yarns/900-remote.yarn index 2d013a6..2875d27 100644 --- a/yarns/900-remote.yarn +++ b/yarns/900-remote.yarn @@ -25,7 +25,8 @@ along with this program. If not, see . vars['private_key_file'] = os.environ['ICK_PRIVATE_KEY'] assertTrue(os.path.exists(vars['private_key_file'])) - IMPLEMENTS GIVEN an access token for scopes (.+) + IMPLEMENTS GIVEN an access token for (\S+) with scopes (.+) + user = get_next_match() scopes = get_next_match() key = open(vars['private_key_file']).read() argv = [ @@ -33,13 +34,10 @@ along with this program. If not, see . scopes, ] token = cliapp.runcmd(argv, feed_stdin=key) - write('token.jwt', token) + store_token(user, token) vars['issuer'] = 'localhost' vars['audience'] = 'localhost' - IMPLEMENTS GIVEN an access token for (\S+) with scopes (.+) - assert 0 - ## Controller configuration IMPLEMENTS GIVEN controller config uses (\S+) at the state directory -- cgit v1.2.1