src/Traits/PerformsPreFlightChecking.php
public function isCorpCharacterWithRoles(): bool
    {

        // Check the role needed for this call. The minimum role would
        // be configured in the roles attribute, but we will add the
        // 'Director' role as directors automatically have all roles.
        array_push($this->roles, 'Director');

        // Perform the check.
        if (in_array($this->scope, $this->token->scopes) && ! empty(
            array_intersect($this->roles, $this->getCharacterRoles()))) {

            return true;
        }

        // Considering a corporation role was required with the scope,
        // fail the authentication check. If we don't fail here, simply
        // granting the SSO scope would pass the next truth test.
        return false;
    }
public function isCorpCharacterWithRoles(): bool
    {

        // Check the role needed for this call. The minimum role would
        // be configured in the roles attribute, but we will add the
        // 'Director' role as directors automatically have all roles.
        array_push($this->roles, 'Director');

        // Perform the check.
        if (in_array($this->scope, $this->token->scopes) && ! empty(
            array_intersect($this->roles, $this->getCharacterRoles()))) {

            return true;
        }

        // Considering a corporation role was required with the scope,
        // fail the authentication check. If we don't fail here, simply
        // granting the SSO scope would pass the next truth test.
        return false;
    }
public function isCorpCharacterWithRoles ( ) : bool { // Check the role needed for this call. The minimum role would // be configured in the roles attribute, but we will add the // 'Director' role as directors automatically have all roles. array_push ( $ this -> roles , 'Director' ) ; // Perform the check. if ( in_array ( $ this -> scope , $ this -> token -> scopes ) && ! empty ( array_intersect ( $ this -> roles , $ this -> getCharacterRoles ( ) ) ) ) { return true ; } // Considering a corporation role was required with the scope, // fail the authentication check. If we don't fail here, simply // granting the SSO scope would pass the next truth test. return false ; }
Determine if the current character refresh token has
the roles needed to make the corporation API call.

@return bool
Determine if the current character refresh token has the roles needed to make the corporation API call .