Skip to content

classes_modules_oauth_oauthstoragemodel.class

Daniel Spors edited this page Dec 19, 2023 · 2 revisions

Classes in file modules/oauth/oauthstoragemodel.class.php

class OAuthStorageModel

Represents a dataset in the wdf_oauthstore table.

Extends: Model

ChangeLocalId

Change a (previously anonymous) local ID.

Definition: public function ChangeLocalId($new_local_id)

Returns: static

Parameters:

  • mixed $new_local_id The new ID for the dataset.

GetAnonId

Generates a anonymous local ID. This may be used later once the OAuth flow returns. Use case: Registration with OAuth without local user account.

Definition: public static function GetAnonId()

Returns: mixed The local id

GetTableName

IMPLEMENTS Model::GetTableName()

GetTokenData

Return oauth token data.

Definition: public function GetTokenData()

Returns: array

Search

Searches datasets for a local_id, optionally filtered for a provider.

Definition: public static function Search($local_id, $provider_name=false)

Returns: OAuthStorageModel

Parameters:

  • mixed $local_id The local user ID

  • string $provider_name Optional provider filter

UpdateFromOwner

INTERNAL Updates this datasets oauth owner data.

UpdateFromToken

INTERNAL Updates this datasets oauth token data.

Validate

Checks if this dataset still contains valid OAuth data.

Definition: public function Validate()

Returns: bool True is valid, else false

Clone this wiki locally