Hi,
I am trying to use Sling @TypeHint to set profile/age = 30, which age is a Long data type.
So this is what I did in curl cmd
curl -u admin:admin -FcreateUser= -FauthorizableId=testuser -Frep:password=testuser -Fprofile/age@TypeHint=Long -Fprofile/age=30 -FintermediatePath="/home/users/test/" http://localhost:4501/libs/granite/security/post/authorizables
But this is not working. Can someone tell me how to fix this?
Thank you
Hi,
Can you please try below and see if it helps.
1]Create user
curl -u admin:admin -FcreateUser= -FauthorizableId=sample -Frep:password=sample http://localhost:4502/libs/granite/security/post/authorizables
2]Add property
curl -u admin:admin -Fprofile/age=25 http://localhost:4502/home/users/s/sample.rw.html
Just try this separately:-
Create a new User
curl -u admin:admin -FcreateUser= -FauthorizableId=hashim -Frep:password=hashim http://localhost:4502/libs/granite/security/post/authorizables
Add a Property to an existing User
curl -u admin:admin -Fprofile/age=25 http://localhost:4502/home/users/h/hashim.rw.html
Create a User with a profile
curl -u admin:admin -FcreateUser=testuser -FauthorizableId=hashimkhan -Frep:password=hashimkhan -Fprofile/gender=male http://localhost:4502/libs/granite/security/post/authorizables
~kautuk
Views
Replies
Total Likes
I would like profile/age to be a Long type "30" instead of a String typed "30" in AEM when I create the user using curl command. How can I do this?
I know @TypeHint is a way, but not sure how to use when I call create user in http://localhost:4501/libs/granite/security/post/authorizables
Views
Replies
Total Likes
-Fproperty-name@TypeHint="Long"
~kautuk
Views
Replies
Total Likes
This is exactly what I wrote in the first thread. And it does not work.
curl -u admin:admin -FcreateUser= -FauthorizableId=testuser -Frep:password=testuser -Fprofile/age@TypeHint=Long -Fprofile/age=30 -FintermediatePath="/home/users/test/" http://localhost:4501/libs/granite/security/post/authorizables
This command puts age (String) = 30 and age@TypeHint (String) = "Long" in the user profile.
Views
Replies
Total Likes