https://github.com/affix/faas-ruby
A Collection of @OpenFaaS functions written in ruby
https://github.com/affix/faas-ruby
openfaas openfaas-function ruby serverless
Last synced: about 1 month ago
JSON representation
A Collection of @OpenFaaS functions written in ruby
- Host: GitHub
- URL: https://github.com/affix/faas-ruby
- Owner: affix
- Created: 2018-05-16T20:36:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-17T21:16:37.000Z (over 7 years ago)
- Last Synced: 2025-01-14T14:59:41.457Z (9 months ago)
- Topics: openfaas, openfaas-function, ruby, serverless
- Language: Ruby
- Size: 7.81 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
OpenFaaS Ruby Funcions
=======================### fass-ruby-jwt
A ruby based JWT Validation plugin, Will return a decoded JWT Token.
please set the public_key environment variable to match your public key. Failure
to do so will result in failed JWT validation.the public_key environment variable should be a base64 encoded representation of
your RSA public key.### faas-ruby-register
Thus function uses a pure ruby mySQL gem to register users to a database, The schema
for this function is located in microblog/schemas. To register a user send a json PayloadExample Payload :
```json
{
"username": "auser",
"password": "TestPassword",
"email": "auser@test.email",
"first_name": "Test",
"last_name": "User"
}
```### faas-ruby-login
A pure ruby based mysql login function. Will return a JWT Token. Built using pure
ruby based mysql gem. This means we can keep our function container small and make
no modifications to the function template from [OpenFaas](https://github.com/openfaas/templates).As we return a valid JWT Token feel free to test it on [jwt.io](https://jwt.io) or
use the faas-ruby-jwt function.At the moment this is just an example and should not be used in a production environment
passwords are only hashed with SHA2 and has no salting.The schema for this function is located in miroblog/schemas
Login Payload:
```json
{"username": "affix", "password": "***************"}
```Example decoded Token:
```json
{
"nbf": 1526456031,
"iat": 1526456031,
"exp": 1526470441,
"user": {
"email": "hidden@hidden.test",
"first_name": "Keiran",
"last_name": "Smith",
"username": "affix"
}
}
```