Nextcloud PHP API (master)

IToken extends JsonSerializable

Tags
since
28.0.0

Table of Contents

Constants

DO_NOT_REMEMBER  = 0
PERMANENT_TOKEN  = 1
REMEMBER  = 1
TEMPORARY_TOKEN  = 0
WIPE_TOKEN  = 2

Methods

getId()  : int
Get the token ID
getLastCheck()  : int
Get the timestamp of the last password check
getLoginName()  : string
Get the login name used when generating the token
getName()  : string
Get the name of the token
getPassword()  : string|null
Get the (encrypted) login password
getRemember()  : int
Get the remember state of the token
getScope()  : string
Get the authentication scope for this token
getScopeAsArray()  : array<string|int, mixed>
Get the authentication scope for this token
getUID()  : string
Get the user UID
setExpires()  : void
Set the expiration time of the token
setLastCheck()  : void
Set the timestamp of the last password check
setPassword()  : void
Set the password
setScope()  : void
Set the authentication scope for this token
setToken()  : void
Set the token

Constants

DO_NOT_REMEMBER

public mixed DO_NOT_REMEMBER = 0
Tags
since
28.0.0

PERMANENT_TOKEN

public mixed PERMANENT_TOKEN = 1
Tags
since
28.0.0

REMEMBER

public mixed REMEMBER = 1
Tags
since
28.0.0

TEMPORARY_TOKEN

public mixed TEMPORARY_TOKEN = 0
Tags
since
28.0.0

WIPE_TOKEN

public mixed WIPE_TOKEN = 2
Tags
since
28.0.0

Methods

getId()

Get the token ID

public getId() : int
Tags
since
28.0.0
Return values
int

getLastCheck()

Get the timestamp of the last password check

public getLastCheck() : int
Tags
since
28.0.0
Return values
int

getLoginName()

Get the login name used when generating the token

public getLoginName() : string
Tags
since
28.0.0
Return values
string

getName()

Get the name of the token

public getName() : string
Tags
since
28.0.0
Return values
string

getPassword()

Get the (encrypted) login password

public getPassword() : string|null
Tags
since
28.0.0
Return values
string|null

getRemember()

Get the remember state of the token

public getRemember() : int
Tags
since
28.0.0
Return values
int

getScope()

Get the authentication scope for this token

public getScope() : string
Tags
since
28.0.0
Return values
string

getScopeAsArray()

Get the authentication scope for this token

public getScopeAsArray() : array<string|int, mixed>
Tags
since
28.0.0
Return values
array<string|int, mixed>

getUID()

Get the user UID

public getUID() : string
Tags
since
28.0.0
Return values
string

setExpires()

Set the expiration time of the token

public setExpires(int|null $expires) : void
Parameters
$expires : int|null
Tags
since
28.0.0

setLastCheck()

Set the timestamp of the last password check

public setLastCheck(int $time) : void
Parameters
$time : int
Tags
since
28.0.0

setPassword()

Set the password

public setPassword(string $password) : void
Parameters
$password : string
Tags
since
28.0.0

setScope()

Set the authentication scope for this token

public setScope(array<string|int, mixed> $scope) : void
Parameters
$scope : array<string|int, mixed>
Tags
since
28.0.0

setToken()

Set the token

public setToken(string $token) : void
Parameters
$token : string
Tags
since
28.0.0

        
On this page

Search results