auth.bend relies on unsafe/foreign
raw source on the hub · import 0x184803968dae9580005e472b803ca2f1/auth.bend as Auth
5 imports
import Base import ./types.bend as Types import ./claims.bend as Claims import ./jwt.bend as JWT import ./cachet.bend as Cachet
Definitions
def Auth.auth_code source · line 7 · raw
U32
def Auth.bearer_prefix source · line 10 · raw
String
def Auth.prefix_len source · line 13 · raw
Nat
def Auth.has_bearer source · line 16 · raw
@+header:String -> Bool
def Auth.when_bearer_maybe source · line 19 · raw
@flag:Bool -> @+header:String -> Maybe<&1, String>
def Auth.bearer_token source · line 26 · raw
@+header:String -> Maybe<&1, String>
def Auth.when_bearer source · line 29 · raw
@flag:Bool -> @+header:String -> Result<&1, &1, Pair(U32, String), String>
def Auth.token_from_header source · line 36 · raw
@+header:String -> Result<&1, &1, Pair(U32, String), String>
def Guard.authorize source · line 39 · raw
@+header:String -> @+secret:String -> @+expected_iss:String -> @+expected_aud:String -> IO(Result<&1, &1, Pair(U32, String), 0x184803968dae9580005e472b803ca2f1/types.Claims>)
def Auth.on_authorized source · line 53 · raw
@+claims:0x184803968dae9580005e472b803ca2f1/types.Claims -> IO(Result<&1, &1, Pair(U32, String), Unit>)