Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rizkimufrizal/oauth2-hmac
https://github.com/rizkimufrizal/oauth2-hmac
apache-cassandra hateoas hmac-sha512 jwt kotlin oauth2 redis
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rizkimufrizal/oauth2-hmac
- Owner: RizkiMufrizal
- License: apache-2.0
- Created: 2017-12-03T12:07:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-03T12:20:40.000Z (about 7 years ago)
- Last Synced: 2024-11-19T22:49:50.760Z (3 months ago)
- Topics: apache-cassandra, hateoas, hmac-sha512, jwt, kotlin, oauth2, redis
- Language: Kotlin
- Size: 89.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OAuth2-HMAC
# How To Use
1. Run the project using this command
```bash
gradle clean bootRun
```2. Generate the access token using this command
```bash
curl -X POST -vu clientid:secret http://localhost:8080/oauth/token -H "Accept: application/json" -d "client_id=clientid&grant_type=client_credentials"
```3. You can generate the HMAC Signature from [HMAC Generator Online](https://www.liavaag.org/English/SHA-Generator/HMAC/). for the input, use this combination
```text
access_token:timestamp:payload
```4. Access The API Using this command
```bash
curl "http://127.0.0.1:8080/api/barangs" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiZXhwIjoxNTEyMzM2MDMxLCJhdXRob3JpdGllcyI6WyJBRE1JTklTVFJBVE9SIiwiQ0xJRU5UIiwiQURNSU4iXSwianRpIjoiNWVhMTEwN2UtOWU0ZC00ZmM0LWE2OTItN2Q5NmU4MjEyMzQ0IiwiY2xpZW50X2lkIjoiY2xpZW50aWQifQ.1YWFx39W2ua4-wcofYM69ybhneMt9vjfKm04fdwy1T8" \
-H "Content-Type: application/json" \
-H "HMAC-Signature: n1ZFRydj1UCvK68Ub3oL1aE8a48GotOTGUHqlj/mBR838DM8CAFJ02Z8G2m6p2ML+vV+XkGw9Be34jcL1axOUA==" \
-H "HMAC-Timestamp: 2017-02-14T10:48:01.000+07:00"
```## Technologi
* Access Token Using JWT RSA
* HMAC with SHA512
* Spring Security
* Spring Session
* Spring OAuth2
* Spring Data Cassandra
* Spring Data Redis
* Spring Boot
* Spring hateoas