Skip to main content

grant_subject

Function grant_subject 

Source
pub fn grant_subject<'a>(
    pds_did: &'a str,
    pds_hostname: &'a str,
    client_id: &'a ClientId,
    requested_scopes: &'a [&'a str],
    now: OffsetDateTime,
) -> Subject<'a>
Expand description

Builds the Subject::Grant a gate judges one pushed authorization request against, before any account is known.

requested_scopes is borrowed as the wire strings the request carried, not as a parsed grammar: didbot_policy has no scope type, and a rule keyed on a scope matches the atom the client actually sent.