Expand my Community achievements bar.

SOLVED

Best way to create,store and update TokenCache in AEM

Avatar

Level 3

Hey, I am integrating Azure MSAL 4J with AEM as Cloud Service(Publish Instance) for SSO Authentication. To store the session for longer times I have to implement a token cache which creates a serialized_cache.json file and gets the session if this is available. here is the documentation reference I am trying to implement:

 

Custom token cache serialization (MSAL4j) - Microsoft Authentication Library for Java | Microsoft Le...

 

What is the best way to create/store/update this file from AEM? Is there a way we can store this in AEM runtime? any examples - Does AEM as Cloud service provide any features to store this(Environment Variables)?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

the AEM implementation stores the token below the users home node. Make sure that it's synced amongst the publish instances.

View solution in original post

4 Replies

Avatar

Employee Advisor

Why don't you use SAML to authenticate against the Azure Directory?

Avatar

Level 3

we have a follow up use case to get users from different portal. so, OOTB SAML won't work for us. So, I created a custom authentication handler to get the token from there we will log on to diff system to get the permissions for the users

Avatar

Correct answer by
Employee Advisor

the AEM implementation stores the token below the users home node. Make sure that it's synced amongst the publish instances.

Avatar

Level 2

Hi nvssr90.

I am also trying to achieve integrating Azure MSAL 4J with AEM as Cloud Service for authentication. Could you please share any good documentation you followed and what authority did you use? Our's is an Azure B2C tenant and facing issues with setting the authority url properly.