Comments (9)
I'm okay with closing this. Just a thought I'd share
from aurelia-authentication.
what why. i think it's a good idea
from aurelia-authentication.
Any ideas for implementation? The simplest way is just to split the string using dots.
http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key
Someone crazy could choose to use a dot within a property name which would screw up the pathing. However I don't think we should cater for this initially. See if it ever comes up as a requirement and if so someone could submit a PR to make an option that is non-breaking by default.
from aurelia-authentication.
i opt for dots
from aurelia-authentication.
I'm not entirely convinced about this approach. If you nest more than one level, you're doing something weird in your API. If that's the case, I'd like to hear complaints about it so they can explain what this is needed for. I'd prefer to cater for the 99%, and see why the other 1% is having problems with this.
That being said, I wouldn't refuse the PR.
from aurelia-authentication.
hmm. probably right. so basically just cut down the sample in the comments to no root and token direct child of root
from aurelia-authentication.
@RWOverdijk this suggestion isn't to allow more nesting (even though technically I guess it could). I'm suggesting this because having 6 options (3 for access, 3 for refresh) seems overkill, the names are confusing and the order is quirky (Prop
, Prop => Name
or Prop => Root => Name
). I'd rather have 2 options (1 for access, 1 for refresh) and if there is any nesting then dot notation is used.
Just to be clear I believe in most cases you would be picking a property from the root, or at most 1 level deep in the response. I am in complete agreement with you. Hey, I'd be happy to have a single property and no nesting at all if you're game :-P
If we weren't to change this then I'd suggest we might consider renaming the nesting properties somehow.
from aurelia-authentication.
Dots, or a general "root" property (for all responses). I'm game yo
from aurelia-authentication.
i copied over the dot version from sattelizer. implemented here #100
from aurelia-authentication.
Related Issues (20)
- Popup not closing: DOMException blocked frame due to cross-origin HOT 2
- Support for not needing new update tokens HOT 2
- Automatic logout if accesstoken expires in more than 24.85 days HOT 1
- Authentication-Change Not Firing in app.ts HOT 1
- Page not reloaded on logout in another tab HOT 7
- If I have the same app open in two different Browser, and log out in one, the other also logs out HOT 1
- Consider supporting httpOnly cookie for storing token HOT 3
- Error after refreshing token HOT 8
- Auth0 not returning Access Token HOT 1
- baseConfig.client.client not defined after baseConfig.configure(authConfig) HOT 1
- Manually setting expired tokens ruins routing HOT 9
- storageChangedReload triggers error HOT 6
- auth0-lock v11 and responseType = 'token' HOT 1
- How Retrieve User Data From Payload?
- ReferenceError: AuthService is not defined HOT 14
- Unable to find module with ID: aurelia-authentication/authFilterValueConverter HOT 2
- unhandle exception on getting from storage
- oAuth 2 not working when inside of Facebook In App Browser HOT 1
- setTimeout(ttl) is not persistent HOT 3
- Read.me API documentation wrong HOT 1
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 aurelia-authentication.