我正在使用 angular-auth-oidc-client lib 使用 keycloak 作为身份服务器来验证我的应用程序。我能够登录到应用程序,但是注销功能不起作用。我已阅读文档并使用相同的注销调用,但它似乎不起作用。请帮忙。提前致谢。
这是我的配置:
{
"sts_server": "http://localhost/auth/realms/test",
"redirect_url": "http://localhost:4200/app/",
"client_id": "test_client",
"response_type": "code",
"scope": "openid profile email",
"post_logout_redirect_uri": "http://localhost:4200/app/#/homepage/",
"startup_route": "/homepage/welcome",
"start_checksession": "true",
"silent_renew": "true",
"silent_renew_url": "assets",
"max_id_token_iat_offset_allowed_in_seconds": "10",
"logLevel": "info",
"forbidden_route": "/unauthorized",
"unauthorized_route": "/unauthorized"
}
我的注销方法:
logOut() {
this.oidcSecurityService.logoffLocal();
this.oidcSecurityService.logoffAndRevokeTokens();
this.oidcSecurityService.logoff();
// none of the three mentioned above work.
}