public function getCredentials()
    {
        $auth = $this->request->getHeader('Authorization');

        if (!$auth) {
            return null;
        }

        if ('basic ' !== strtolower(substr($auth, 0, 6))) {
            return null;
        }

        $credentials = explode(':', base64_decode(substr($auth, 6)), 2);

        if (2 !== count($credentials)) {
            return null;
        }

        return $credentials;
    }
public function getCredentials()
    {
        $auth = $this->request->getHeader('Authorization');

        if (!$auth) {
            return null;
        }

        if ('basic ' !== strtolower(substr($auth, 0, 6))) {
            return null;
        }

        $credentials = explode(':', base64_decode(substr($auth, 6)), 2);

        if (2 !== count($credentials)) {
            return null;
        }

        return $credentials;
    }
public function getCredentials ( ) { $ auth = $ this -> request -> getHeader ( 'Authorization' ) ; if ( ! $ auth ) { return null ; } if ( 'basic ' !== strtolower ( substr ( $ auth , 0 , 6 ) ) ) { return null ; } $ credentials = explode ( ':' , base64_decode ( substr ( $ auth , 6 ) ) , 2 ) ; if ( 2 !== count ( $ credentials ) ) { return null ; } return $ credentials ; }
This method returns a numeric array with a username and password as the
only elements.

If no credentials were found, this method returns null.

@return null|array
This method returns a numeric array with a username and password as the only elements .