OKTA SSO与Spring Boot集成

问题描述

我正在尝试在我的Spring Boot应用程序中使用OKTA SSO。我遵循了https://developer.okta.com/blog/2017/11/20/add-sso-spring-boot-15-min上的教程。到目前为止,我已经能够将应用程序重定向到OTKA登录页面并成功登录,然后将用户名返回到我的应用程序,就像在教程中给出的一样。现在,我在管理会话时遇到一个问题,对于每个要通过OKTA检查的API请求,用户是否仍然有效。

@GetMapping("/")
    public String welcome2User(Principal principal) {
        return "Hi "+principal.getName()+" Welcome to xxx SSO Sample project"+principal.toString();
    }

方法仅提供以下详细信息: 嗨xxxxxxxxxxx欢迎使用xxxxxxx SSO示例xxxxxxxxxxxx委托人:xxxxxxxxxxxx;凭证:[受保护];已验证:true;详细信息:remoteAddress = xxxxxxxxxxxxx,sessionId =,tokenType = BearertokenValue =;没有授予任何权限

有人可以告诉我如何在响应中获取访问令牌或如何在PRincipal对象的响应中获取Jsession id吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)