tcmaker / tcmaker-keyfobs Goto Github PK
View Code? Open in Web Editor NEWThis project forked from vandahm/tcmaker-keyfobs
License: GNU Affero General Public License v3.0
This project forked from vandahm/tcmaker-keyfobs
License: GNU Affero General Public License v3.0
The following SQS Schema is proposed for new messages.
See https://github.com/tcmaker/access_control/blob/master/doc/tcdoor-spec.md for the larger picture.
{
"action" : "activate",
"code" : "codenumber", //string, not integer
"facility" : "frontdoor",
"codetype" : "fob", //"fob" or "passcode"
"member": "3870", //string or int
"priority": 3, //integer
"tag": "d2f3ce26-12ab-4b2a-8943-d49e4a7b1420",
"effective" : "ISO8601 UTC Time",
"expiration" : "ISO8601 UTC Time"
}
Note: @rrotter requests we enforce a maximum duration of a credential, rejecting all credentials where the expiration is later than e.g. a week after the effective date, as a fail-safe, thus requiring a user be occasionally re-activated by the membership systems, each reactivation overlapping with the previous. I have no opposition to such a requirement.
{
"action": "revoke",
"facility" : "facilityname",
"tag" : "f2151449-113e-4e2c-8c7d-fcecafd8b9d8"
}
Change all of a memberid's credentials, to replace a keyfob, for example
{
"action": "modify",
"facility" : "name",
"member" : "memberId",
"oldtype": "fob", //"fob" or "passcode"
"oldcode": "numbers",
"newtype" : "fob", //"fob" or "passcode"
"newcode" : "newnumbers"
}
{
"action": "set-requirement",
"requiredpriority" : 1, //integer
"facility" : "frontdoor",
"tag" : "556aba4d-4d5f-4779-a914-d80e73b2696b",
"description" : "desc", //optional, for convenience
"timespec" : "SEE BELOW"
}
For timespec
, one of the following values SHALL be used:
always
{
"action": "revoke-requirement",
"facility" : "facilityname",
"tag" : "192f0827-3a9c-41f1-a7e1-5446340a744a"
}
In CRM/Keyfobs/BAO/Keyfob.php
lives the current activate and deactivate functions:
A short-term workaround may work to eliminate the deactivation functionality, and update the activate to compute a fob expiration time, and send using that. The door controller will not mind duplicate credentials.
tcmaker-keyfobs/CRM/Keyfobs/BAO/Keyfob.php
Lines 83 to 123 in a9396a1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.