简体   繁体   English

CQ5:如何将登录用户的安全上下文传播到集成的Web应用程序?

[英]CQ5: How can I propagate a logged-in user's security context to an integrated web application?

Given is the following: 给出以下内容:

  • an AEM CMS which allows login of users AEM CMS,允许用户登录
  • a Java web application (built with Spring) that is integrated into the AEM CMS via URL. 通过URL集成到AEM CMS中的Java Web应用程序(使用Spring构建)。

Question: Once the user is logged-in, how can the CMS propagate the user's identity (with proof of his authentication) reliably to the integrated web application? 问题:用户登录后,CMS如何将用户身份(带有身份验证证明)可靠地传播到集成Web应用程序?

Its really the question of what you want to share as authentication to web-service. 真正的问题是您想与Web服务共享哪些身份验证。 Your question doesn't specify what kind of web-service call it is? 您的问题没有指定调用哪种网络服务?

Once user is logged in then you can get the username from below code. 用户登录后,您可以从以下代码中获取用户名。 It will give you anonymous if user is not logged-in. 如果用户未登录,它将给您anonymous

Using this information you can make a call to web-service conditionally. 使用此信息,您可以有条件地调用Web服务。 And it also depends on what kind of hand-shake is happening b/w AEM and Spring web-service. 而且,这还取决于AEM和Spring Web服务是否正在发生什么样的握手。

com.adobe.granite.security.user.UserProperties
UserProperties userProfile = slingRequest.getResourceResolver().adaptTo(UserProperties.class);
            if(null != userProfile){
                UserName = userProfile.getAuthorizableID();
            }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Spring Security应用程序中的所有模板中显示当前登录用户的信息,包括WebMvcConfigurerAdapter管理的视图 - How to display current logged-in user's information in all templates including view managed by WebMvcConfigurerAdapter in Spring Security application 如何使用 JDBCRealm 获取登录用户的用户名? - How can I get the logged-in user's username using JDBCRealm? 跟踪用户是否在无状态Web应用程序中登录? - Tracking whether user is logged-in in a stateless web application? 如果我在cq5 Web应用程序中有多个干扰者,谁将充当负载平衡器? - Who acts as load balancer if I have several dispathers in cq5 web application? 在Spring 3控制器中,如何检查登录用户的权限并有条件地执行某些操作? - In a Spring 3 controller, how can I check the permissions of the logged-in user and do certain actions conditionally? Android / MySQL:如何根据与登录用户关联的部门显示数据? - Android/MySQL: how can I display data based on the department associated with the logged-in user? 如何将安全性传播到我的独立Web服务企业应用程序? - How do i propagate security to my independent web service enterprise application? 如何在CQ5中对过去2个月内修改的内容进行全文搜索? - How can I do a full text search in CQ5 for content modified in the last 2 months? 使用Active Directory登录时,如何在Web应用程序(在GWT中)中获得用户登录名? - How can I get user logon name in web application (in GWT) when I logged using Active Directory? Jhipster网关用户如何才能仅从登录用户的服务中获取实体 - How Jhipster Gateway user can get the entities from a Service for the logged-in user ONLY
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM