public function getRefreshToken($refresh_token)
	{
		// create refresh token
		$token = \Components\Developer\Models\Refreshtoken::oneByToken($refresh_token);

		// make sure we have a token
		if (!$token->get('id'))
		{
			return false;
		}

		// make sure its a published token
		if (!$token->isPublished())
		{
			return false;
		}

		// get the application's client id
		$application = \Components\Developer\Models\Application::oneOrFail($token->get('application_id'));
		$token->set('client_id', $application->get('client_id'));

		// format expires to unix timestamp
		$token->set('expires', with(new Date($token->get('expires')))->toUnix());

		// return token
		return $token->toArray();
	}
public function getRefreshToken($refresh_token)
	{
		// create refresh token
		$token = \Components\Developer\Models\Refreshtoken::oneByToken($refresh_token);

		// make sure we have a token
		if (!$token->get('id'))
		{
			return false;
		}

		// make sure its a published token
		if (!$token->isPublished())
		{
			return false;
		}

		// get the application's client id
		$application = \Components\Developer\Models\Application::oneOrFail($token->get('application_id'));
		$token->set('client_id', $application->get('client_id'));

		// format expires to unix timestamp
		$token->set('expires', with(new Date($token->get('expires')))->toUnix());

		// return token
		return $token->toArray();
	}
public function getRefreshToken ( $ refresh_token ) { // create refresh token $ token = \ Components \ Developer \ Models \ Refreshtoken :: oneByToken ( $ refresh_token ) ; // make sure we have a token if ( ! $ token -> get ( 'id' ) ) { return false ; } // make sure its a published token if ( ! $ token -> isPublished ( ) ) { return false ; } // get the application's client id $ application = \ Components \ Developer \ Models \ Application :: oneOrFail ( $ token -> get ( 'application_id' ) ) ; $ token -> set ( 'client_id' , $ application -> get ( 'client_id' ) ) ; // format expires to unix timestamp $ token -> set ( 'expires' , with ( new Date ( $ token -> get ( 'expires' ) ) ) -> toUnix ( ) ) ; // return token return $ token -> toArray ( ) ; }
Load refresh token details by token

@param   string  $refresh_token  Refresh token
@return  array   Refresh token details
Load refresh token details by token