Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kürzeder committed Sep 10, 2019
1 parent 6592619 commit 3d320aa
Showing 1 changed file with 8 additions and 40 deletions.
48 changes: 8 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Developing
1. Download and install the EditorConfig plugin for Visual Studio: [https://github.com/editorconfig/editorconfig-visualstudio#readme](https://github.com/editorconfig/editorconfig-visualstudio#readme)
2. Launch `premake.bat`
3. Open `Build/JWT.sln`
3. Open `Build/Redis.sln`

### Debugging
1. Create a directory junktion to MTA-Server directory in the root of the repo
Expand All @@ -20,51 +20,19 @@
2. Add `<module src="ml_redis.dll"/>` (or `.so` for Linux) to your `mtaserver.conf`.
3. Start the server

### Linux
In order to run the module you'll need to compile and install `cpp_redis` yourself.
See [https://github.com/Cylix/cpp_redis/wiki/Mac-&-Linux-Install](https://github.com/Cylix/cpp_redis/wiki/Mac-&-Linux-Install) on how to do that.

## Depdencies
* libcrypto (openssl or compatible)
* libssl-dev (for the header files)
* https://github.com/cpp-redis/cpp_redis

## API
## Globals
### Algorithm
* `JWT_ALGORITHM_HS256`
* `JWT_ALGORITHM_HS384`
* `JWT_ALGORITHM_HS512`
* `JWT_ALGORITHM_RS256`
* `JWT_ALGORITHM_RS384`
* `JWT_ALGORITHM_RS512`
*Todo*

## Functions
### Function: `jwtSign`
```cpp
bool jwtSign(function(string/boolean) callback, table claims, JWT_ALGORITHM algorithm, string secret/private_key_path, bool is_file_path = false)
```
* __callback:__ Lorem ipsum
* __claims:__ Lorem ipsum
* __algorithm:__ Lorem ipsum
* __secret/private_key_path__ Lorem ipsum
* __is_file_path__ Lorem ipsum
Returns __true__ if everything went fine, __false__ otherwise.
### Function: `jwtVerify`
```cpp
bool jwtVerify(function(boolean) callback, string token, string secret/public_key_path, bool is_file_path = false)
```
* __callback:__ Lorem ipsum
* __token:__ Lorem ipsum
* __secret/file_path__ Lorem ipsum
* __is_file_path__ Lorem ipsum

Returns __true__ if everything went fine, __false__ otherwise.

### Function: `jwtGetClaims`
```cpp
table jwtGetClaims(string token)
```
* __token:__ Lorem ipsum
Returns a table __containing the claims__.
*Todo*

## Download
via https://github.com/Contextualist/glare
Expand Down

0 comments on commit 3d320aa

Please sign in to comment.