public function getScopes($accessToken)
    {
        $scopeResults = DB::table('oauth_session_token_scopes')
	    	->select('oauth_scopes.*')
            ->join('oauth_session_access_tokens', 'oauth_session_token_scopes.session_access_token_id', '=', 'oauth_session_access_tokens.id')
            ->join('oauth_scopes', 'oauth_session_token_scopes.scope_id', '=', 'oauth_scopes.id')
            ->where('access_token', $accessToken)
            ->get();
        
        $scopes = array();
        
		foreach($scopeResults as $key=>$scope)
		{
			$scopes[$key] = get_object_vars($scope);
	
		}
		
        return $scopes;
    }
public function getScopes($accessToken)
    {
        $scopeResults = DB::table('oauth_session_token_scopes')
	    	->select('oauth_scopes.*')
            ->join('oauth_session_access_tokens', 'oauth_session_token_scopes.session_access_token_id', '=', 'oauth_session_access_tokens.id')
            ->join('oauth_scopes', 'oauth_session_token_scopes.scope_id', '=', 'oauth_scopes.id')
            ->where('access_token', $accessToken)
            ->get();
        
        $scopes = array();
        
		foreach($scopeResults as $key=>$scope)
		{
			$scopes[$key] = get_object_vars($scope);
	
		}
		
        return $scopes;
    }
public function getScopes ( $ accessToken ) { $ scopeResults = DB :: table ( 'oauth_session_token_scopes' ) -> select ( 'oauth_scopes.*' ) -> join ( 'oauth_session_access_tokens' , 'oauth_session_token_scopes.session_access_token_id' , '=' , 'oauth_session_access_tokens.id' ) -> join ( 'oauth_scopes' , 'oauth_session_token_scopes.scope_id' , '=' , 'oauth_scopes.id' ) -> where ( 'access_token' , $ accessToken ) -> get ( ) ; $ scopes = array ( ) ; foreach ( $ scopeResults as $ key => $ scope ) { $ scopes [ $ key ] = get_object_vars ( $ scope ) ; } return $ scopes ; }
Get all associated access tokens for an access token

Example SQL query:

<code>
SELECT oauth_scopes.* FROM oauth_session_token_scopes JOIN oauth_session_access_tokens
ON oauth_session_access_tokens.`id` = `oauth_session_token_scopes`.`session_access_token_id`
JOIN oauth_scopes ON oauth_scopes.id = `oauth_session_token_scopes`.`scope_id`
WHERE access_token = :accessToken
</code>

Expected response:

<code>
array (
array(
'key'    =>  (string),
'name'   =>  (string),
'description'    =>  (string)
),
...
...
)
</code>

@param  string $accessToken The access token
@return array
Get all associated access tokens for an access token