diff options
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/900-local.yarn | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/yarns/900-local.yarn b/yarns/900-local.yarn index 18bf056..43f710c 100644 --- a/yarns/900-local.yarn +++ b/yarns/900-local.yarn @@ -41,7 +41,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. vars['audience'] = 'localhost' IMPLEMENTS GIVEN an access token for (\S+) with scopes (.+) - assert 0 + 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) + filename = '{}.jwt'.format(user) + write(filename, token) + vars['issuer'] = 'localhost' + vars['audience'] = 'localhost' ## Controller configuration |