FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\UI\Api\Models\TokenRequest Class Reference
Collaboration diagram for Fossology\UI\Api\Models\TokenRequest:
Collaboration graph

Public Member Functions

 __construct (string $tokenName, string $tokenScope, string $tokenExpire, string $username="", string $password="")
 
 setTokenName (string $tokenName)
 
 setTokenScope (string $tokenScope)
 
 setTokenExpire (string $tokenExpire)
 
 setUsername (string $username)
 
 setPassword (string $password)
 
 getTokenName ()
 
 getTokenScope ()
 
 getTokenExpire ()
 
 getUsername ()
 
 getPassword ()
 

Static Public Member Functions

static fromArray (array $input, int $version)
 

Public Attributes

const VERSION_1_KEYS
 
const VERSION_2_KEYS
 

Private Attributes

 $tokenName
 
 $tokenScope
 
 $tokenExpire
 
 $username
 
 $password
 

Detailed Description

Definition at line 16 of file TokenRequest.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\UI\Api\Models\TokenRequest::__construct ( string  $tokenName,
string  $tokenScope,
string  $tokenExpire,
string  $username = "",
string  $password = "" 
)
Parameters
string$tokenNameToken Name
string$tokenScopeToken Scope
string$tokenExpireToken Expiry
string$usernameUsername
string$passwordPassword
Exceptions
HttpBadRequestExceptionIf request is invalid

Definition at line 64 of file TokenRequest.php.

Member Function Documentation

◆ fromArray()

static Fossology\UI\Api\Models\TokenRequest::fromArray ( array  $input,
int  $version 
)
static
Parameters
array$inputRequest body
int$versionVersion
Returns
TokenRequest
Exceptions
HttpBadRequestException

Definition at line 184 of file TokenRequest.php.

◆ getPassword()

Fossology\UI\Api\Models\TokenRequest::getPassword ( )
Returns
string

Definition at line 173 of file TokenRequest.php.

◆ getTokenExpire()

Fossology\UI\Api\Models\TokenRequest::getTokenExpire ( )
Returns
string

Definition at line 157 of file TokenRequest.php.

◆ getTokenName()

Fossology\UI\Api\Models\TokenRequest::getTokenName ( )
Returns
string

Definition at line 141 of file TokenRequest.php.

◆ getTokenScope()

Fossology\UI\Api\Models\TokenRequest::getTokenScope ( )
Returns
string

Definition at line 149 of file TokenRequest.php.

◆ getUsername()

Fossology\UI\Api\Models\TokenRequest::getUsername ( )
Returns
string

Definition at line 165 of file TokenRequest.php.

◆ setPassword()

Fossology\UI\Api\Models\TokenRequest::setPassword ( string  $password)
Parameters
string$password
Returns
TokenRequest

Definition at line 132 of file TokenRequest.php.

◆ setTokenExpire()

Fossology\UI\Api\Models\TokenRequest::setTokenExpire ( string  $tokenExpire)
Parameters
string$tokenExpire
Returns
TokenRequest
Exceptions
HttpBadRequestException

Definition at line 109 of file TokenRequest.php.

◆ setTokenName()

Fossology\UI\Api\Models\TokenRequest::setTokenName ( string  $tokenName)
Parameters
string$tokenName
Returns
TokenRequest
Exceptions
HttpBadRequestException

Definition at line 80 of file TokenRequest.php.

◆ setTokenScope()

Fossology\UI\Api\Models\TokenRequest::setTokenScope ( string  $tokenScope)
Parameters
string$tokenScopeOn of RestHelper::VALID_SCOPES
Returns
TokenRequest
Exceptions
HttpBadRequestException

Definition at line 94 of file TokenRequest.php.

◆ setUsername()

Fossology\UI\Api\Models\TokenRequest::setUsername ( string  $username)
Parameters
string$username
Returns
TokenRequest

Definition at line 122 of file TokenRequest.php.

Member Data Documentation

◆ $password

string Fossology\UI\Api\Models\TokenRequest::$password
private

Password

Definition at line 54 of file TokenRequest.php.

◆ $tokenExpire

DateTime Fossology\UI\Api\Models\TokenRequest::$tokenExpire
private

Token Expiry

Definition at line 44 of file TokenRequest.php.

◆ $tokenName

string Fossology\UI\Api\Models\TokenRequest::$tokenName
private

Token Name

Definition at line 34 of file TokenRequest.php.

◆ $tokenScope

string Fossology\UI\Api\Models\TokenRequest::$tokenScope
private

Token Scope

Definition at line 39 of file TokenRequest.php.

◆ $username

string Fossology\UI\Api\Models\TokenRequest::$username
private

Username

Definition at line 49 of file TokenRequest.php.

◆ VERSION_1_KEYS

const Fossology\UI\Api\Models\TokenRequest::VERSION_1_KEYS
Initial value:
= ["username", "password", "token_name", "token_scope",
"token_expire"]

Definition at line 22 of file TokenRequest.php.

◆ VERSION_2_KEYS

const Fossology\UI\Api\Models\TokenRequest::VERSION_2_KEYS
Initial value:
= ["username", "password", "tokenName", "tokenScope",
"tokenExpire"]

Definition at line 28 of file TokenRequest.php.


The documentation for this class was generated from the following file: