Bånder

SpotifyCredentialService
in package

Table of Contents

Properties

$thirdPartyCredentialService  : ThirdPartyCredentialService

Methods

__construct()  : mixed
getAccessToken()  : string|null
Get the access token for a user
getRefreshToken()  : string|null
Get the refresh token for a user
hasValidCredentials()  : bool
Check if user has valid Spotify credentials
isTokenExpired()  : bool
Check if access token is expired
removeCredentials()  : void
Remove Spotify credentials for a user
storeCredentials()  : void
Store Spotify credentials for a user

Properties

Methods

getAccessToken()

Get the access token for a user

public getAccessToken(User $user) : string|null
Parameters
$user : User
Return values
string|null

getRefreshToken()

Get the refresh token for a user

public getRefreshToken(User $user) : string|null
Parameters
$user : User
Return values
string|null

hasValidCredentials()

Check if user has valid Spotify credentials

public hasValidCredentials(User $user) : bool
Parameters
$user : User
Return values
bool

storeCredentials()

Store Spotify credentials for a user

public storeCredentials(User $user, string $accessToken, string $refreshToken[, int|null $expiresIn = null ]) : void
Parameters
$user : User
$accessToken : string
$refreshToken : string
$expiresIn : int|null = null

        
On this page

Search results