src/AuthorizesWithOAuth2.php
protected function getTokenByClientCredentialsGrant()
    {
        $token = $this->getAuthorizationServer()->getAccessToken('client_credentials', [
            'scope' => $this->config['client_credentials']['scope'],
        ]);

        $this->getFrameworkBridge()->persistClientToken(
            $this->config['client_credentials']['client_id'],
            $token->getToken(),
            $token->getExpires(),
            $token->getValues()['role']
        );

        return $token;
    }
protected function getTokenByClientCredentialsGrant()
    {
        $token = $this->getAuthorizationServer()->getAccessToken('client_credentials', [
            'scope' => $this->config['client_credentials']['scope'],
        ]);

        $this->getFrameworkBridge()->persistClientToken(
            $this->config['client_credentials']['client_id'],
            $token->getToken(),
            $token->getExpires(),
            $token->getValues()['role']
        );

        return $token;
    }
protected function getTokenByClientCredentialsGrant ( ) { $ token = $ this -> getAuthorizationServer ( ) -> getAccessToken ( 'client_credentials' , [ 'scope' => $ this -> config [ 'client_credentials' ] [ 'scope' ] , ] ) ; $ this -> getFrameworkBridge ( ) -> persistClientToken ( $ this -> config [ 'client_credentials' ] [ 'client_id' ] , $ token -> getToken ( ) , $ token -> getExpires ( ) , $ token -> getValues ( ) [ 'role' ] ) ; return $ token ; }
Authorize a machine based on the given client credentials.

@return mixed
Authorize a machine based on the given client credentials .