Nextcloud PHP API (master)

IVerificationToken

Tags
since
23.0.0

Table of Contents

Methods

check()  : void
Checks whether the a provided tokent matches a stored token and its constraints. An InvalidTokenException is thrown on issues, otherwise the check is successful.
create()  : string
delete()  : void
Deletes the token identified by the provided parameters

Methods

check()

Checks whether the a provided tokent matches a stored token and its constraints. An InvalidTokenException is thrown on issues, otherwise the check is successful.

public check(string $token, IUser|null $user, string $subject[, string $passwordPrefix = '' ][, bool $expiresWithLogin = false ]) : void

null can be passed as $user, but mind that this is for conveniently passing the return of IUserManager::getUser() to this method. When $user is null, InvalidTokenException is thrown for all the issued tokens are user related.

Parameters
$token : string
$user : IUser|null
$subject : string
$passwordPrefix : string = ''
$expiresWithLogin : bool = false
Tags
throws
InvalidTokenException
since
23.0.0

create()

public create(IUser $user, string $subject[, string $passwordPrefix = '' ]) : string
Parameters
$user : IUser
$subject : string
$passwordPrefix : string = ''
Tags
since
23.0.0
Return values
string

delete()

Deletes the token identified by the provided parameters

public delete(string $token, IUser $user, string $subject) : void
Parameters
$token : string
$user : IUser
$subject : string
Tags
since
23.0.0

        
On this page

Search results