Skip to content

Commit 47186e4

Browse files
Merge pull request #21 from saharsh-agrawal/master
docs: Added Saharsh as maintainer in README.md
2 parents 0d62c98 + ce8651a commit 47186e4

File tree

1 file changed

+49
-44
lines changed

1 file changed

+49
-44
lines changed

README.md

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
<details>
3838
<summary>Table of Contents</summary>
3939

40-
- [About The Project](#about-the-project)
41-
- [Getting Started](#getting-started)
42-
- [Prerequisites](#prerequisites)
43-
- [Installation](#installation)
44-
- [How to use](#how-to-use)
45-
- [How does this work?](#how-does-this-work)
46-
- [Why heimdall as a service?](#why-heimdall-as-a-service)
47-
- [Maintainer(s)](#maintainers)
48-
- [Contact](#contact)
49-
- [Additional documentation](#additional-documentation)
40+
- [About The Project](#about-the-project)
41+
- [Getting Started](#getting-started)
42+
- [Prerequisites](#prerequisites)
43+
- [Installation](#installation)
44+
- [How to use](#how-to-use)
45+
- [How does this work?](#how-does-this-work)
46+
- [Why heimdall as a service?](#why-heimdall-as-a-service)
47+
- [Maintainer(s)](#maintainers)
48+
- [Contact](#contact)
49+
- [Additional documentation](#additional-documentation)
5050

5151
</details>
5252

@@ -73,16 +73,17 @@ To set up a local instance of the application, follow the steps below.
7373

7474
The following dependencies are required to be installed for the project to function properly:
7575

76-
- [go](https://go.dev/)
77-
- [nodejs](https://nodejs.org/en/download/package-manager)
76+
- [go](https://go.dev/)
77+
- [nodejs](https://nodejs.org/en/download/package-manager)
7878

7979
To create the `credentials.json` file, set up the things below by following the respective guides:
80-
- [OAuth consent screen](https://developers.google.com/workspace/guides/configure-oauth-consent#configure_oauth_consent).
81-
- [OAuth client ID credentials](https://developers.google.com/workspace/guides/create-credentials#oauth-client-id).
82-
- While creating OAuth client ID credentials, set the redirect URL to any port of localhost.
83-
- Save the downloaded JSON file as `credentials.json` in the project's root directory.
84-
- Then enable [Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com) to enable receiving OTP.
85-
80+
81+
- [OAuth consent screen](https://developers.google.com/workspace/guides/configure-oauth-consent#configure_oauth_consent).
82+
- [OAuth client ID credentials](https://developers.google.com/workspace/guides/create-credentials#oauth-client-id).
83+
- While creating OAuth client ID credentials, set the redirect URL to any port of localhost.
84+
- Save the downloaded JSON file as `credentials.json` in the project's root directory.
85+
- Then enable [Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com) to enable receiving OTP.
86+
8687
<p align="right">(<a href="#top">back to top</a>)</p>
8788

8889
### Installation
@@ -92,28 +93,30 @@ _Now that the environment has been set up and configured to properly compile and
9293
<!-- UPDATE -->
9394

9495
1. Clone the repository
95-
```sh
96-
git clone https://github.com/metakgp/heimdall.git
97-
```
96+
```sh
97+
git clone https://github.com/metakgp/heimdall.git
98+
```
9899
2. Configure environment variables
99-
```sh
100-
cd ./heimdall
101-
cp .env.template .env
102-
```
103-
Choose a strong JWT_SECRET_KEY and edit the `.env` file accordingly.
100+
101+
```sh
102+
cd ./heimdall
103+
cp .env.template .env
104+
```
105+
106+
Choose a strong JWT_SECRET_KEY and edit the `.env` file accordingly.
104107

105108
3. Install Go dependencies
106-
```sh
107-
go mod download
108-
```
109+
```sh
110+
go mod download
111+
```
109112
4. Compile the code
110-
```sh
111-
go build
112-
```
113+
```sh
114+
go build
115+
```
113116
5. Execute the script
114-
```sh
115-
./heimdall
116-
```
117+
```sh
118+
./heimdall
119+
```
117120

118121
When prompted to enter the authorization code, visit the link provided in the terminal, which will redirect to localhost. Then, inspect the URL after redirection and copy the string after `code=` and paste it in the terminal. This will create a `token.json` file. You need to create this token only once, and it will be valid for 6 months.
119122

@@ -146,13 +149,14 @@ While just doing this would have sufficed, we do not know whether these Public I
146149
<img width="80%" alt="image" src="./assets/whois.png">
147150
</a>
148151
149-
_For complete Whois information, check [here](https://whois.domaintools.com/203.110.242.30)._
152+
_For complete Whois information, check [here](https://whois.domaintools.com/203.110.242.30)._
153+
150154
</div>
151155
152156
> [!Note]
153157
> The above functionality is implemented in the main (`/`) route
154158
155-
When the user enters the institute mail ID, an OTP is sent (`/get-otp`) and once they verify the OTP (`/verfiy-otp`), a cookie is generated which is valid only for the domain `*.metakgp.org` (including its subdomains like `naarad.metakgp`, `gyft.metakgp`, etc.). This cookie contains the user's institute mail ID, which can be retrieved from it.
159+
When the user enters the institute mail ID, an OTP is sent (`/get-otp`) and once they verify the OTP (`/verfiy-otp`), a cookie is generated which is valid only for the domain `*.metakgp.org` (including its subdomains like `naarad.metakgp`, `gyft.metakgp`, etc.). This cookie contains the user's institute mail ID, which can be retrieved from it.
156160

157161
The endpoint `/validate-jwt` validates the cookie that is sent along with the request to access internal services like Naarad and Gyft. Once the user's mail ID is verified, they can access the above services, making sure that they are accessible only to institute students.
158162
@@ -164,14 +168,15 @@ Well yes. Provided it has a backend server. This cannot be done in the front-end
164168

165169
Also, one service - to protect all of our services. Reducing code repetition and easy integration.
166170

167-
<p align="right">(<a href="#top">back to top</a>)</p>
171+
<p align="right">(<a href="#top">back to top</a>)</p>
168172

169173
## Maintainer(s)
170174

171175
<!-- UPDATE -->
172176

173-
- [Chirag Ghosh](https://github.com/chirag-ghosh)
174-
- [Arpit Bhardwaj](https://github.com/proffapt)
177+
- [Chirag Ghosh](https://github.com/chirag-ghosh)
178+
- [Arpit Bhardwaj](https://github.com/proffapt)
179+
- [Saharsh Agrawal](https://github.com/saharsh-agrawal)
175180

176181
<p align="right">(<a href="#top">back to top</a>)</p>
177182

@@ -203,10 +208,10 @@ Also, one service - to protect all of our services. Reducing code repetition and
203208

204209
## Additional documentation
205210

206-
- [License](/LICENSE)
207-
- [Code of Conduct](/.github/CODE_OF_CONDUCT.md)
208-
- [Security Policy](/.github/SECURITY.md)
209-
- [Contribution Guidelines](/.github/CONTRIBUTING.md)
211+
- [License](/LICENSE)
212+
- [Code of Conduct](/.github/CODE_OF_CONDUCT.md)
213+
- [Security Policy](/.github/SECURITY.md)
214+
- [Contribution Guidelines](/.github/CONTRIBUTING.md)
210215

211216
<p align="right">(<a href="#top">back to top</a>)</p>
212217

0 commit comments

Comments
 (0)