/
OIDC CLIENT CREATION

OIDC CLIENT CREATION

Step 1: Authenticate using the following the api and request body.

POST - {{url}}/v1/authmanager/authenticate/clientidsecretkey

{ "id": "string", "version": "string", "requesttime": "2022-04-07T09:24:32.998Z", "metadata": {}, "request": { "appId": "admin", "clientId": "mosip-pms-client", "secretKey": "***********" } }

Step 2: Create JWT Private Key & Public Key

2.1. Go to URL : https://mkjwk.org/
2.2. Select RSA Tab
2.3. Select Key Size 2056
2.4. Select Key Use : Signature
2.5. Select Algorithm : RS256:RSASSA-PKCS11-v1_5 Using SHA-256
2.6. Select Show X.509 : No
2.7. Select Key_id : Specify and enter KeyId and Generate
2.8. Deploy the public and private key pair in the jwe-userinfo-service-secrets and mock-relying-party-service-secrets ( or for the relying party secrets).
2.9 Use the private key to create the client id.

Step 3: Creating CLIENT_ID for the OIDC client.
3.1. Replace the name, public key, policyId, authpartnerId and url’s of the healthportal( or the relying party UI).
3.2. From the response - find the client_Id.

POST - {{url}}/v1/partnermanager/oidc/client

{ "requestTime": "{{$isoTimestamp}}", "request": { "name": "test-oidc-client", "publicKey": { "kty": "RSA", "e": "AQAB", "use": "sig", "alg": "RS256", "n": "iJeGguCHwYqxtKSaNqYUErsFaAPqjBqk0u53nsicbJRM6SEJJ1FWWsySXUx-g8VQdS0xV8-phIGRmf7bexWDCWGNCU5k2kCg1n5VtTwsqf2lN_Md4vUoq6u39Z2bjpJywF4bcpRLwc6F1NQcF5XNLG7khBOdrae1H942DLSuSj9MoZ9uK-5OovFTZqzMCqnCfE2bmtaJ1-14WjY5S7IKcrqXZmWCmgWiCOpVg7dWd5gP2ziXANUb5jmHmZczGs3kqjgFGQc31jtdV3oiaMwLovnBfktaQ1SfQdX9fZ49sqONqQiFVMi1o3_GqxV-wB4xR_FBHnn-bEsEP-KtACgWMQ" }, "policyId": "84786", "authPartnerId": "abcbank", "logoUri": "https://raw.githubusercontent.com/AvanishDuggiredddy/logo-hosting/refs/heads/hosting/logo.png", "redirectUris": [ "https://dev.mosip.net/userprofile" ], "grantTypes": [ "authorization_code" ], "clientAuthMethods": [ "private_key_jwt" ] } }

 Related articles

To Onboard Auth Partner for esignet