summaryrefslogtreecommitdiff
path: root/yarns/900-remote.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-05 12:57:22 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-05 12:57:22 +0100
commit89cc8f3239f824755d9d19b3b5877ff62900b787 (patch)
tree846ebdd4ead54782034c5576c06924c58e953706 /yarns/900-remote.yarn
parent9eed0d65ba6ff39aa41a0bfbc3926605416b2dfe (diff)
downloadick2-89cc8f3239f824755d9d19b3b5877ff62900b787.tar.gz
Refactor: change token generation to name the user
Diffstat (limited to 'yarns/900-remote.yarn')
-rw-r--r--yarns/900-remote.yarn8
1 files changed, 3 insertions, 5 deletions
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 <http://www.gnu.org/licenses/>.
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 <http://www.gnu.org/licenses/>.
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