Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Adobe AccessTokenProvider error

Avatar

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

Avatar

Correct answer by
Employee Advisor

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

Avatar

Correct answer by
Employee Advisor

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").

 

Avatar

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.

Avatar

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

Avatar

Employee Advisor
tbh, I don't know the API, so I cannot give you proper advice.