mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
-get-gcp-jwt: returns time of expiry
Couldn't bring myself to pass in a relative date without a base, so we instead pass now into get-access-token, and return the time of expiry.
This commit is contained in:
parent
b0bb659f12
commit
9f43fef85d
@ -36,7 +36,8 @@
|
||||
'https://www.googleapis.com/auth/cloud-platform'
|
||||
aud now.bowl
|
||||
==
|
||||
;< p=[tok=@t exp=@dr] bind:m (get-access-token sot aud)
|
||||
;< p=[tok=@t exp=@da] bind:m
|
||||
(get-access-token sot aud now.bowl)
|
||||
(pure:m !>(p))
|
||||
::
|
||||
++ read-setting
|
||||
@ -98,8 +99,8 @@
|
||||
:: https://developers.google.com/identity/protocols/oauth2/service-account
|
||||
::
|
||||
++ get-access-token
|
||||
|= [jot=@t url=@t]
|
||||
=/ m (strand ,[@t @dr]) ^- form:m
|
||||
|= [jot=@t url=@t now=@da]
|
||||
=/ m (strand ,[@t @da]) ^- form:m
|
||||
;< ~ bind:m
|
||||
%: send-request:strandio
|
||||
method=%'POST'
|
||||
@ -137,5 +138,5 @@
|
||||
==
|
||||
?> =('Bearer' typ)
|
||||
%- pure:m
|
||||
[tok exp]
|
||||
[tok (add exp now)]
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user