OAuthSession
class OAuthSession
This class holds all the variables stored during a session
Properties
private string | $id | The serial number of the session used especially for database storage | |
private string | $sessionId | The id of the session | |
private string | $state | The state parameter of authorization flow | |
private string | $nonce | The value used to mitigate replay attacks | |
private AccessToken | $accessToken | The access token received from the provider | |
private string | $provider | The name of the provider | |
private string | $creation | The creation date of the session in '%Y-%m-%d %H:%M:%S' format | |
private string | $userId | The user ID of the resource owner at the provider |
Methods
Constructs a OAuthSession object from an array of session values
Returns the serial number of the session
Returns the id of the session
Returns the state parameter of authorization flow
Returns the nonce used to mitigate replay attacks
Returns the access token received from the provider
Returns the name of the provider
Returns the creation date of the session in '%Y-%m-%d %H:%M:%S' format
Returns the user ID of the resource owner
Sets the serial number of the session
Sets the the id of the session
Sets the state parameter of authorization flow
Sets the nonce used to mitigate replay attacks
Sets the the name of the provider
Sets the creation date of the session in '%Y-%m-%d %H:%M:%S' format
Sets the user ID of the resource owner
Converts the OAuthSession object to array
Details
at line 74
__construct($oauthSession = [])
Constructs a OAuthSession object from an array of session values
at line 106
string
getId()
Returns the serial number of the session
at line 115
string
getSessionId()
Returns the id of the session
at line 124
string
getState()
Returns the state parameter of authorization flow
at line 133
string
getNonce()
Returns the nonce used to mitigate replay attacks
at line 142
AccessToken
getAccessToken()
Returns the access token received from the provider
at line 151
string
getProvider()
Returns the name of the provider
at line 160
string
getCreation()
Returns the creation date of the session in '%Y-%m-%d %H:%M:%S' format
at line 169
string
getUserId()
Returns the user ID of the resource owner
at line 180
OAuthSession
setId(string $id)
Sets the serial number of the session
at line 192
OAuthSession
setSession(string $sessionId)
Sets the the id of the session
at line 204
OAuthSession
setState(string $state)
Sets the state parameter of authorization flow
at line 216
OAuthSession
setNonce(string $nonce)
Sets the nonce used to mitigate replay attacks
at line 228
OAuthSession
setAccessToken(AccessToken $accessToken)
Sets the access token received from the provider
at line 240
OAuthSession
setProvider(string $provider)
Sets the the name of the provider
at line 252
OAuthSession
setCreation(string $creation)
Sets the creation date of the session in '%Y-%m-%d %H:%M:%S' format
at line 264
OAuthSession
setUserId(string $userId)
Sets the user ID of the resource owner
at line 274
array
toArray()
Converts the OAuthSession object to array