ucdavis / namster Goto Github PK
View Code? Open in Web Editor NEWNAM search tool
License: MIT License
NAM search tool
License: MIT License
Take for example https://namstr.ucdavis.edu/search/ENTOMOLOGY. I get good results back, and on the left side I get filters. However when I select the filter it doesn't filter down to just those results. For example, the HUTCH filter says there should be 9 results, but when I click on it and get https://namstr.ucdavis.edu/search/ENTOMOLOGY?building=HUTCH, there are other buildings shown in that list, and the filter numbers also don't look right anymore.
So I think the best plan is to add to the API controller an auth filter, so that every request is checked against a list of valid keys/tokens.
We've used something like this before:
https://gist.github.com/srkirkland/f72be06b457d1dad8dae87e12811d70e
Then on the controller you just add it like [AuthTokenFilter]
to the API controller class.
The one tweak would be that we'll want to store a list of valid tokens instead of one single token like the above example has. Should be pretty easy though, just read from the config and split the string into an array of valid tokens, and check that the passed-in token matches any one of those.
Note this example is from the older version of .NET, so some tweaks might be needed.
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.