MangoPay/Libraries/AuthorizationTokenManager.php
public function GetToken($autenticationKey)
    {
        $token = $this->_storageStrategy->Get();
        
        if (is_null($token) || false === $token || $token->IsExpired() || $token->GetAutenticationKey() != $autenticationKey) {
            $this->StoreToken($this->_root->AuthenticationManager->CreateToken());
        }
    
        return $this->_storageStrategy->Get();
    }
public function GetToken($autenticationKey)
    {
        $token = $this->_storageStrategy->Get();
        
        if (is_null($token) || false === $token || $token->IsExpired() || $token->GetAutenticationKey() != $autenticationKey) {
            $this->StoreToken($this->_root->AuthenticationManager->CreateToken());
        }
    
        return $this->_storageStrategy->Get();
    }
public function GetToken ( $ autenticationKey ) { $ token = $ this -> _storageStrategy -> Get ( ) ; if ( is_null ( $ token ) || false === $ token || $ token -> IsExpired ( ) || $ token -> GetAutenticationKey ( ) != $ autenticationKey ) { $ this -> StoreToken ( $ this -> _root -> AuthenticationManager -> CreateToken ( ) ) ; } return $ this -> _storageStrategy -> Get ( ) ; }
Gets the current authorization token.
In the very first call, this method creates a new token before returning.
If currently stored token is expired, this method creates a new one.
@return \MangoPay\Libraries\OAuthToken Valid OAuthToken instance.
Gets the current authorization token . In the very first call this method creates a new token before returning . If currently stored token is expired this method creates a new one .