fco / cro-http-session-red Goto Github PK
View Code? Open in Web Editor NEWLicense: Artistic License 2.0
License: Artistic License 2.0
Because a Red::Model
isn't quite the right type of, er, type the pattern suggested in the https://cro.services/docs/http-auth-and-sessions to create subsets of the UserSession object like:
subset Admin of My::App::Session where .is-admin;
subset LoggedIn of My::App::Session where .is-logged-in;
Won't work directly (giving The 'of' type of a subset must either be a valid nominal type or a type that can provide one
) so one has to make an intermediate subset instead like:
subset UserSession of Cro::HTTP::Auth where * ~~ My::App::Session;
subset Admin of UserSession where .is-admin;
subset LoggedIn of UserSession where .is-logged-in;
(Assuming My::App::Session
is your Red model.)
I don't think this can easily be fixed given the way Red works (and would have to be done in Red itself besides,) but is probably worth noting in the documentation to avoid a future issue.
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.