Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ottiker/flow-auth
Authentication for flow
https://github.com/ottiker/flow-auth
Last synced: about 1 month ago
JSON representation
Authentication for flow
- Host: GitHub
- URL: https://github.com/ottiker/flow-auth
- Owner: ottiker
- Created: 2014-02-21T15:00:55.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-24T10:15:27.000Z (about 8 years ago)
- Last Synced: 2024-11-07T10:53:01.259Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flow Authentication
Authentication module for flow.
### Global config
```json
{
"token": {
"duration": 600000,
"secret": "longRandomString"
},
"session": {
"cookieName": "SES",
"requestKey": "session",
"secret": "longRandomString",
"duration": 86400000,
"activeDuration": 1800000,
"cookie": {
"ephemeral": true,
"httpOnly": true,
"secure": true
}
}
}
```
### Flow composition
```json
{
"flow": {
"token.create": {
"d": [
[":flow_tools/transform", {
"content": "{user_email}"
}],
":token.create"
]
},
"token.validate": {
"d": [
[":flow_tools/transform", {
"token": "{token}"
}],
":token.validate"
]
},
"session.get": {
"d": [
":session.get"
]
},
"session.set": {
"d": [
[":flow_tools/transform", {
"user": "{user_id}",
"role": "{user_role}",
"lang": "{user_lang}"
}]
":session.set"
]
},
"session.destroy": {
"d": [
":session.destroy"
]
}
}
}
```