Skip to content

Commit

Permalink
docs(readme): updated diagram
Browse files Browse the repository at this point in the history
docs(readme): updated diagram
  • Loading branch information
moabu authored Apr 2, 2024
2 parents 7883e8f + 56c3312 commit aacaaaf
Showing 1 changed file with 45 additions and 37 deletions.
82 changes: 45 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,65 +11,73 @@

# Agama-Hellō

This demo project shows how to use Agama to leverage the powerful
[hello.coop](https://hello.coop) platform for consumer authentication, which
supports a variety of authenticators and social login options. Also, This is an example to show the reusability of agama flows from one project to another.
This Agama project uses [agama-openid](https://github.com/GluuFederation/agama-openid) for OpenID authentication to leverage the powerful
[hello.coop](https://hello.coop) platform for consumer authentication, which supports a variety of authenticators and social login options.
Also, This is an example to show the reusability of agama flows from one project to another.

# Overview
# Requirements
- Agama Dependency: [agama-openid](https://github.com/GluuFederation/agama-openid) deployment
- Credentials: [Hellō SaaS](https://hello.coop) client credentials

A basic diagram to understand how the `agama-hello` works.

![agama-hello](https://github.com/GluuFederation/agama-hello/assets/20867846/5738b051-3988-4dfd-b5c8-31bab5ef262b)

# Deploy and Test

## Requirements
# Supported IDPs

1. Running instance of Jans Auth Server or Gluu Flex
2. [agama-openid](https://github.com/GluuFederation/agama-openid) deployment required
| IDP | How to Install? |
|-------|---------------|
| Jans Auth Server | [https://docs.jans.io/stable/admin/install/](https://docs.jans.io/stable/admin/install/) |
| Gluu Flex | [https://docs.gluu.org/stable/install/](https://docs.gluu.org/stable/install/) |

## Deployment
# Flows

Download the latest [agama-hello.gama](https://github.com/GluuFederation/agama-hello/releases/latest/download/agama-hello.gama) file and deploy it on Auth Server. You can follow this [guideline](https://gluu.org/quick-start-guide/) if you don't know how to deploy an Agama Project. Also, You can fork this project and open it in [Agama Lab](https://cloud.gluu.org/agama-lab) for better customizations.
| Qualified Name | Description |
|----------------|-------------|
| `org.gluu.hello.coop`| Main agama flow of this project. It first collects the configuration details and triggers to `org.gluu.inbound.oauth2.AuthzCodeWithUserInfo` flow of agama-openid project. After successful authentication, redirect to this main flow for the user onboard. Kindly, check the [diagram](#sequence-diagram) for better understanding |

## Configuration
# Configurations

Modify the configuration file with your **hello.coop** client credentials,
which you can find on the [console page](https://console.hello.coop) :
Sample JSON:
```
{
"org.gluu.hello.coop": {
"hello": {
"clientId": "CLIENT_IDENTIFIER", <--- ADD YOUR CLIENT ID
"clientSecret": "CLIENT_SECRET", <--- ADD YOUR CLIENT SECRET
"authzEndpoint": "https://wallet.hello.coop/authorize",
"tokenEndpoint": "https://wallet.hello.coop/oauth/token",
"userInfoEndpoint": "https://wallet.hello.coop/oauth/userinfo",
"scopes": [
"openid"
]
},
"uidPrefix": ""
"oauth": {
"authzEndpoint": "https://wallet.hello.coop/authorize",
"tokenEndpoint": "https://wallet.hello.coop/oauth/token",
"userInfoEndpoint": "https://wallet.hello.coop/oauth/userinfo",
"clientId": "CLIENT_INDENTIFIER",
"clientSecret": "CLIENT_SECRET",
"scopes": [
"openid"
]
},
"uidPrefix": "hello-"
}
}
}
```

### Additional Properties
| Flow | Property | Description |
| ---- | -------- | ----------- |
| `org.gluu.hello.coop` | `oauth` | These are OAuth parameters for OpenID authentication. To know more details on these (`oauthParams`), Kindly check [agama-openid](https://github.com/GluuFederation/agama-openid?tab=readme-ov-file#authzcodewithuserinfo-and-authzcode) section|
| `org.gluu.hello.coop` | `uidPrefix` | Prefix string value for user unique ID. By default, Each user those are onboarded through this flow will use the prefix `hello-` with username |

- `redirectUri`
- `clientCredsInRequestBody`
- `custParamsAuthReq`
- `custParamsTokenReq`

To know more details on these (`oauthParams`), Kindly check [agama-openid](https://github.com/GluuFederation/agama-openid?tab=readme-ov-file#authzcodewithuserinfo-and-authzcode)
# Sequence Diagram
A basic diagram to understand how the `agama-hello` works.

![hello-agama-diagram](https://github.com/GluuFederation/agama-hello/assets/20867846/dd854a29-a507-4718-b366-89e4e07abfdf)
([Source Image](https://sequencediagram.org/index.html#initialData=C4S2BsFMAIEMHNYFtYFoAWlzgPbQMqQCOArpAHYDGMAIiAgE7IBQslwOD0ACpAwM45yzAA6wGoSiDHlg0AEYMcAd359R4ydNizoyyPP5hIGiSCky5AeW6mtluIhQYsuO+e26EyNDhEUQABN3Cx05TGwcZmZeASFUAD5FFTUGAC5oABkceBBhZNU+RP1DYwzmEqNgSESC1IyGSECQRvZoDmgbZjqihJsM2BJgdHJoRtJIfjlvFAB9ADNcZQBeTngAOnhwEhJ1iNx1yhw-ZhtEmbR9nAy8gDccAGsTC5dI86dff3IgjIAVBhA8HgfDSAB1yGtNttdnl5DgSORAuscINhgAmdYAQSG6AAXgBhHCBSAAdTA6AAqqkAJLkeZRF5+AKBWpKQrpMZNFqQNodK7dNmpRJXAY40bjMhTZhXYWua7QXC5UboWAiL78aVyxL9aCUWDYeRsB6nbjvHyoJnfQIZK66onPD4Wr5BM3OEXQfgkSjUfgal4yhKVMqdbh24nMIA))

## Test Deployment
# Demo

You'll need an OpenID Connect test RP. You can try [oidcdebugger](https://oidcdebugger.com/),
[jans-tarp](https://github.com/JanssenProject/jans/tree/main/demos/jans-tarp) or [jans-tent](https://github.com/JanssenProject/jans/tree/main/demos/jans-tent). Check out this video to see
an example of **agama-hello** in action:
[jans-tarp](https://github.com/JanssenProject/jans/tree/main/demos/jans-tarp) or [jans-tent](https://github.com/JanssenProject/jans/tree/main/demos/jans-tent).
Check out this video to see an example of **agama-hello** in action:

![ezgif-1-1574bd2d5c](https://github.com/GluuFederation/agama-hello/assets/20867846/79c70c6c-b4fa-42d2-9ed6-00e5186b4f0d)

<!--
![ezgif com-video-to-gif](https://github.com/GluuFederation/agama-hello/assets/20867846/2158f064-ff8b-430f-a382-32e5e360a3cf)
-->

# Contributors

Expand Down

0 comments on commit aacaaaf

Please sign in to comment.