Oauth2Connection::AuthorizeClient (open)
Start a redirecting authorization flow from the current page
Syntax
LOADLIB "mod::system/lib/webapi/oauth2.whlib";
RECORD FUNCTION AuthorizeClient(RECORD options)Parameters
RECORD optionsOptions
STRING access_type'offline' to request a refresh_token. defaults to 'online'
STRING code_verifierA PKCE code verifier to use for authorization
RECORD extraparametersAny extra parameters, eg [ prompt := "consent" ]
STRING ARRAY scopesRequested scopes
Return value
RECORDSuccess information
BOOLEAN successTrue if we've succesfully authorized the client. AuthorizeClient redirects to the oauth2 flow if we don't have the token yet
Description
This function is designed to run the same webpage twice - first it will notice the oauthsession2= variable missing and redirect to the oauth pages. Oauth will then redirect back to the page, and we will return the token