user mapping

Avatar

Avatar
Validate 1
Level 1
bsr060893
Level 1

Likes

2 likes

Total Posts

35 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
bsr060893
Level 1

Likes

2 likes

Total Posts

35 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
bsr060893
Level 1

10-05-2020

what is the difference between user mapping service and user mapping amendment service?
when to use them differently?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
ArpitVarshney
MVP

Likes

136 likes

Total Posts

185 posts

Correct reply

36 solutions
Top badges earned
Validate 1
Establish
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
MVP
ArpitVarshney
MVP

Likes

136 likes

Total Posts

185 posts

Correct reply

36 solutions
Top badges earned
Validate 1
Establish
Give Back 5
Give Back 3
Give Back 25
View profile
ArpitVarshney
MVP

10-05-2020

Hi @bsr060893 

 

Please go through this blog http://www.sgaemsolutions.com/2017/10/sling-service-authentication-in-aem-63.html

Apache Sling Service User Mapper Amendment

  • This configuration is used when you want to have an individual configuration for a particular project.
  • If there are more than one configurations correspond to a particular bundle, based on the ranking, service can be picked. (The highest the number will be having highest ranking).

Regards,

Arpit 

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

10-05-2020

Service Users and Mappings

Sling 7 offers a Service User Mapping service, which allows to configure a bundle-to-user mapping and two corresponding API methods: SlingRepository.loginService() and ResourceResolverFactory.getServiceResourceResolver() which return a session/resource resolver with the privileges of a configured user only. These methods have the following characteristics:

They allow mapping services to users
They make it possinle to define sub-service users
The central configuration point is: org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl
service-id = service-name [ “:” subservice-name ]

service-id is mapped to a resource resolver and/or JCR repository user ID for authentication
service-name is the symbolic name of the bundle providing the service

 

Mapping amendments for service user mapper
If you are still not using service user mapping amendments – you are doing a big mistake! This feature allows you to define mappings in a modular way. To use it, create config for factory org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended.