Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Page business logic based on SAML response

Avatar

Avatar
Level 1
francescob53463
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
francescob53463
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile
francescob53463
Level 1

16-10-2020

Good morning from Italy,

all the SAML guides for AEM explain how to protect a full page (the page is visible to logged user vs the page is not visibile to non logged user).

 

Can you please point out any guide that explain how to create a more granual business logic based on SAML data?

 

For example:

  • the page is public (everyone can see the page)
  • if the user is logged, AEM should shows his email somewhere in the header (taken from the SAML response or from userProps.getProperty("email") as explained here
  • if the user is not logged, instead of showing his email, a "login" link should be shown

 

Is there any guide that can explain how to do it?

thanks

Francesco

 

AEM businesslogic SAML

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

140 likes

Total Posts

543 posts

Correct Reply

165 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

140 likes

Total Posts

543 posts

Correct Reply

165 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile
PuzanovsP
MVP

16-10-2020

Hello Francesco,

 

Unfortunately, since AEM 5.6.1 Adobe Saml library has been locked for any really cool work, so you can only use what's available OOTB,

 

Adobe Docs have these details[1]

 

They should give you a good starting point.

 

[1] https://helpx.adobe.com/experience-manager/using/aem63_saml.html

 

If you need more then what's there is OOTB you'll have lots of work ahead of you.

 

Regards,

Peter

Answers (1)

Answers (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,133 likes

Total Posts

3,161 posts

Correct Reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,133 likes

Total Posts

3,161 posts

Correct Reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

16-10-2020

Hi Franceso,

Actually that's very easy, because it should not matter at all how a user got logged in. Assuming that you have mapped that user to a JCR user (what the standard SAML authentication does) you can just do something like

 

User user = request.getResource().adaptTo(User.class);

user.getProperties(...)