This is not an official Google product.
This implementation is not an official Google product, nor is it part of an official Google product. Support is available on a best-effort basis via GitHub.
This repository contains a Web UI to demonstrate OIDC scenario implemented in Apigee GitHub DevRel Identity Facade repository.
Deploy the Apigee GitHub DevRel Identity Facade proxy following instructions provided.
Then, You must have identity-facade-v1 proxy deployed in your Apigee organization.
Edit identity-facade-v1 proxy to be able to send ID Token to the client App.
Update OA2-GenerateAccessToken and change line:
<Attribute name="idp.jwt" ref="oidc.flow.jwt" display="false"/>
to
<Attribute name="idp.jwt" ref="oidc.flow.jwt" display="true"/>
NOTE:
Dependinf on IDP configured, you may not received an Identity Token having name and email variables set. If not, Get Data result will be:{"fault":{"faultstring":"Invalid JSON path $.name in policy EV-ExtractUserInfo.","detail":{"errorcode":"steps.extractvariables.InvalidJSONPath"}}}
To avoid this error message, edit identity-facade-v1 proxy and update EV-ExtractUserInfo. Add line:
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
- Clone this repository
- Install dependencies
npm install
- Copy .env_example to .env.
- Edit .env file.
- Replace CLIENT_ID and CLIENT_SECRET values by Key and Secret values copied from Apigee Application identityApp (created during Identity Facade deployment, step 1). Examples:
- Key: xkey-nnnnnnn
- Secret: xsecret
- Update ISSUER=https://<APIGEEE_HOSTNAME>/v1/oauth20, replacing <APIGEEE_HOSTNAME> by your Apigee environment hostname
- Update DATA_URI=https://<APIGEEE_HOSTNAME>/v1/oauth20/protected, replacing <APIGEEE_HOSTNAME> by your Apigee environment hostname (you can also use another proxy URL & path, secured by an OAuthV2 policy, Operation=VerifyAccessToken)
- Replace CLIENT_ID and CLIENT_SECRET values by Key and Secret values copied from Apigee Application identityApp (created during Identity Facade deployment, step 1). Examples:
Start Apigee-OIDC-facade-UI
node app.js
Open a browser and connect to http://localhost:8082/ et voilĂ !