Problem with Authorization Server Keys

When trying to register api client using postman request with OpenEMR V7.X it throw in error response
“The authorization server encountered an unexpected condition which prevented it from fulfilling the request: Security error - problem with authorization server keys.”

Post Request : localhost/openemr/oauth2/default/registration.
Request Body :
{
“application_type”: “private”,
“client_name”: “A Private App”,
“token_endpoint_auth_method”: “client_secret_post”,
“contacts”: [“me@example.org”, “them@example.org”],
“scope”: “…”
}

Please provide us solution to work on this.

Welcome to community @Milan,

You have to resolve your oaprivate.key and oapublic.key issue then it will going to work fine.

Hi Nilesh,

Can you please help me showing the steps to resolve this issue ?
I checked “sites\default\documents\certificates” directory but it is empty.
Also in openemr keys table it overwrite oauth2key properly

@Milan are you using windows or linux

I am using windows system

@Milan Please refer below link

Hi Nilesh,

extension=php_openssl.dll

Above configuration is already configured in php.ini file.

@Milan Added OPENSSL_CONF to your environment variable that will solve your issue. Please find the reference for same

image

Hi Nilesh,

I am new to this OpenEMR configuration, so please sorry for silly question.
But just wanted to confirm that if I am not wrong then I need to configure this path in System Environment Variables settings of Windows ?

Yes your correct @Milan

Hi Nilesh,

After adding environment variable in system settings, it is working properly.
Thanks a lot for your support.