def refresh.go

bend-kit-oauth2@0.11.0.1 · oauth2.bend:201

import bend-kit-oauth2@0.11.0.1/oauth2.bend as Oauth2
import Base
import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin

201def refresh.go(none: Bool, h: Hairpin.Client, cfg: Config, +r: String, +scope: String) -> IO(Hairpin.Client & Result<&1, &1, Err, Token>):
202  match none:
203    case True{}:
204      IO.pure(Hairpin.Client & Result<&1, &1, Err, Token>, (h, Fail{ErrExpired{}}))
205    case False{}:
206      grant(h, cfg, scoped(scope, field(form("grant_type", "refresh_token"), "refresh_token", r)), r)

Uses (15)

Used by (1)