Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个托管 Web 应用程序的服务提供商。这些应用程序受到部署在服务提供者中的 J2EE 过滤器的保护,该过滤器拦截请求并与 SAML 2.0 身份提供者通信。现在,同一个服务提供商甚至必须托管 Oauth 2.0 资源(因此成为 Oauth 2.0 资源服务器)。如何改进我的 J2EE 过滤器以检测哪些请求必须通过 SAML 2.0 保护,哪些请求需要通过 Oauth 2.0 access_token 进行保护?提前致谢。
据我了解,您需要使用此过滤器保护 Web url/服务。因此,在这种情况下,您可以根据上下文过滤请求的资源,例如使用 SAML 对带有上下文 /X/department/finance/* 的 url 或服务的请求,并且可能是 /X/department/hr/* 使用 OAuth。
如果资源也相同,可以根据客户端发送的请求参数进行识别。