Skip to content

AuthPrincipal

1 min read

Import: import system.webapi.auth;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

AuthPrincipal

Verified identity and application-defined space-separated permission scopes.

public class AuthPrincipal

subject

Stable identifier of the authenticated account.

public subject: string

scopes

Space-separated permissions granted to this account or token.

public scopes: string

constructor

Creates a AuthPrincipal with subject, scopes.

public constructor(subject: string, scopes: string)

has_scope

Returns whether the space-separated scope list includes scope.

public fun has_scope(scope: string): bool