Comments (4)
Nice one! I think we should add under "expected outcome":
If no token is supplied, the api should return all toggles belonging to default project and the result of their evaluation
If a token is supplied, the token's environment and project data should be respected.
But what happens if you provide an invalid token? 401 or the same as if no token? I'd lean towards the 401 because that's clearer to the user.
This also isn't entirely true:
The desired behavior is shown in the endpoint /api/client/features which works both with and without token when Unleash is configured with AuthType.None
Because the api/client/features endpoint disregards the token entirely if AuthType is None: so even if you provide a token with a specified enviroment / projects, it disregards it and gives you all projects in the default environment. That's a separate bug, though.
from unleash.
Oh, and for the record: I'm not entirely convinced that allowing you to call the endpoint without a token is the right thing to do, because it feels like we're encouraging it that way, and it probably won't do what you want it to do. However, there is an argument to be made that at least the client and frontend APIs will work the same if we do, so you get a consistent experience.
from unleash.
Thank you @thomasheartman!
I think we should add under "expected outcome":
Done!
But what happens if you provide an invalid token? 401 or the same as if no token? I'd lean towards the 401 because that's clearer to the user.
Yeah that makes sense to me as well!
This also isn't entirely true:
Ugh, I missed that! But yes, separate issue!
I'm not entirely convinced that allowing you to call the endpoint without a token is the right thing to do, because it feels like we're encouraging it that way, and it probably won't do what you want it to do. However, there is an argument to be made that at least the client and frontend APIs will work the same if we do, so you get a consistent experience.
Indeed, this feels like it needs doing now for consistency, but deprecation and clearer use case could be warranted down the road
from unleash.
Closing this now that #6247. It seems the github auto-closer doesn't like the word "and".
from unleash.
Related Issues (20)
- Initial/default admin user cannot be accessed when using `demo` authentication type HOT 4
- feat: Markdown support in flag description HOT 4
- fix: Starting unleash without DB details gives silly error message.
- Cloned feature toggles clone "created at" too HOT 1
- Publish unleash-server image to the AWS public ECR gallaery HOT 4
- Context properties types HOT 3
- DEBUG: Cleaning up feature flag test HOT 31
- Support for Alternative Database Options HOT 2
- Easier DB CA certificate configuration HOT 1
- Suggestions for some method signature changes HOT 2
- Make CORS configuration entries independent so they can managed with API calls HOT 3
- CORS Issue for Unleash admin API from vue webapp HOT 1
- docs: Broken links found HOT 1
- Feature Search API misbehaves when features have no metrics within the last hour HOT 4
- Chore: Is variant type 'number' supported?
- admin panel stuck within login screen HOT 2
- Add ability to not write feature definition to file system and use in memory cache HOT 4
- bug: Issue with Deleting Feature Toggle in Unleash HOT 1
- feat: add POST support in frontend API as well
- Feat: Extend "current" import/export capability to support file as a startup argument.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unleash.