def authorize.url

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

import bend-kit-oauth2@0.11.0.1/oauth2.bend as Oauth2
import Base
import bend-kit-url@0.4.1.0/url.bend as Url

291# RFC 6749 §4.1.1 with RFC 7636 §4.3: the URL to send the user to. endpoint may carry its own query.
292def authorize.url(cfg: Config, +endpoint: String, +redirect: String, +scope: String, +state: String, +challenge: String) -> String:
293  Config{t, +id, s} = cfg
294  +q = field(field(field(field(field(form("response_type", "code"), "client_id", id), "redirect_uri", redirect), "state", state),
295    "code_challenge", challenge), "code_challenge_method", "S256")
296  endpoint ++ Bool.pick(String, qmark(endpoint), "&", "?") ++ Url.form(scoped(scope, q))

Uses (9)

Used by (0)

No other definition uses this definition.