public function getCredentials(Request $request)
    {
        $token = !empty($request->headers->get(self::AUTHORIZATION_HEADER)) ?
            $request->headers->get(self::AUTHORIZATION_HEADER) :
            $request->cookies->get(AuthResponseService::AUTH_COOKIE);

        return new CredentialTokenModel(str_replace(self::BEARER, '', $token));
    }