Documentation

OAuthOptionsTrait

The settings for the OAuth provider

Table of Contents

Properties

$callbackURL  : string
$fileStoragePath  : string
$key  : string
$pkceVerifierLength  : int
$secret  : string
$sessionStart  : bool
$sessionStop  : bool
$sessionStorageVar  : string
$storageEncryptionKey  : string
$tokenAutoRefresh  : bool
$useStorageEncryption  : bool
$callbackURL  : string
The (main) callback URL associated with your application
$fileStoragePath  : string
The file storage root path (requires permissions 0777)
$key  : string
The application key (or client-id) given by your provider
$pkceVerifierLength  : int
The length of the PKCE challenge verifier (43-128 characters)
$secret  : string
The application secret given by your provider
$sessionStart  : bool
Whether to start the session when session storage is used
$sessionStop  : bool
Whether to end the session when session storage is used
$sessionStorageVar  : string
The session key for the storage array
$storageEncryptionKey  : string
The encryption key (hexadecimal) to use
$tokenAutoRefresh  : bool
Whether to automatically refresh access tokens (OAuth2)
$useStorageEncryption  : bool
Whether to use encryption for the file storage

Methods

set_fileStoragePath()  : void
sets and verifies the file storage path
set_pkceVerifierLength()  : void
clamps the PKCE verifier length between 43 and 128
set_storageEncryptionKey()  : void
sets an encryption key

Properties

$callbackURL

The (main) callback URL associated with your application

protected string $callbackURL = ''

$fileStoragePath

The file storage root path (requires permissions 0777)

protected string $fileStoragePath = ''
Tags
see
is_writable()
see
FileStorage

$key

The application key (or client-id) given by your provider

protected string $key = ''

$secret

The application secret given by your provider

protected string $secret = ''

$sessionStart

Whether to start the session when session storage is used

protected bool $sessionStart = true

Note: this will only start a session if there is no active session present

Tags
see
session_status()
see
SessionStorage

$sessionStop

Whether to end the session when session storage is used

protected bool $sessionStop = false

Note: this is set to false by default to not interfere with other session managers

Tags
see
session_status()
see
SessionStorage

$storageEncryptionKey

The encryption key (hexadecimal) to use

protected string $storageEncryptionKey = ''
Tags
see
sodium_crypto_secretbox_keygen()
see
FileStorage

$useStorageEncryption

Whether to use encryption for the file storage

protected bool $useStorageEncryption = false
Tags
see
FileStorage

Methods

set_fileStoragePath()

sets and verifies the file storage path

protected set_fileStoragePath(string $fileStoragePath) : void
Parameters
$fileStoragePath : string

set_pkceVerifierLength()

clamps the PKCE verifier length between 43 and 128

protected set_pkceVerifierLength(int $pkceVerifierLength) : void
Parameters
$pkceVerifierLength : int

set_storageEncryptionKey()

sets an encryption key

protected set_storageEncryptionKey(string $storageEncryptionKey) : void
Parameters
$storageEncryptionKey : string

        
On this page

Search results