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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Adobe AccessTokenProvider error

NareshBabu
Level 2
Level 2

Hello experts,

 

I am getting the following error when trying to get the access token using the AccessTokenProvider.getAccessToken() method. I am passing the proper parameters, resourceResolver generated from User, user id and claims as null. Below is the screenshot of the error.

 

b9b8c322-bd4f-483a-a368-5dcb224bd2d7.jpeg

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

It looks that you have some problem with your keyStore. 

 

KeyStoreService.getKeyStoreKeyPair (resourceResolver, ID, keyPairAlias) returns null. The KeyPairAlias is the value configured at the OSGI service "Adobe Granite Access Token Provider"  with the property name "auth.token.provider.keypair.alias" (default value is "access-token-key-pair").

 

View solution in original post

4 Replies
Jörg_Hoh
Correct answer by
Employee
Employee

It looks that you have some problem with your keyStore. 

 

KeyStoreService.getKeyStoreKeyPair (resourceResolver, ID, keyPairAlias) returns null. The KeyPairAlias is the value configured at the OSGI service "Adobe Granite Access Token Provider"  with the property name "auth.token.provider.keypair.alias" (default value is "access-token-key-pair").

 

View solution in original post

NareshBabu
Level 2
Level 2
Thanks Jorg. It worked. What should be the value of "auth.token.provider.client.id", If I provider "TestClient" as value I am getting the invalid client id parameter as error. If I provide actual value I am getting null pointer exception.
NareshBabu
Level 2
Level 2
Thanks Jorg. It worked. What should be the value of "auth.token.provider.client.id", If I provider "TestClient" as value I am getting the invalid client id parameter as error. If I provide actual value I am getting null pointer exception in method buildJwt line no. 501
Jörg_Hoh
Employee
Employee
tbh, I don't know the API, so I cannot give you proper advice.