Comments (2)
I think the principle is that the server needs to validate, and the client usually doesn't need to validate (trust the server). Validating would require sending the secret to the client, which would be bad. However, this library has the ability to decode and verify client-side: https://github.com/kjur/jsrsasign/wiki/Tutorial-for-JWT-verification
from angular-jwt.
I guess taking into account how the JWT-angular is meant to be used, I guess you are right, it's really not part of the library as client does not read and use any sensitive data thus no need to verify the token on the client side. It's up to the dev to realize that jwtHelper.decodeToken
does NOT and verify the token and thus result cannot be trusted.
Yes, if the JWT is signed with a secret, I agree, client cannot contain the secret. In case the JWT is signed with a private key, it can be verified in the client side with the signers public key. For example when you implement OpenID Connect Implicit 1.0 flow (http://openid.net/specs/openid-connect-implicit-1_0.html) client needs to verify the callbacks id_token
with servers public key. And yes, I used the https://github.com/kjur/jsrsasign for that.
from angular-jwt.
Related Issues (20)
- Minification problems HOT 2
- urlBase64Decode issue HOT 3
- Restangular not setting the token on requests HOT 1
- Angular 6.0.0 not supporting the Angular JWT HOT 12
- --prod build. Function expressions are not supported in decorators in 'ɵ0' HOT 2
- SSR is failing window doesn't exist HOT 2
- How the Payload will get converted in the JWT Token ? HOT 1
- Breaking changes in latest patch release 0.1.10 HOT 1
- Can't run test suite
- Don't reference actual window HOT 1
- Interceptor can choke on undefined response HOT 5
- Can't inject anything to jwtOptionsProvider tokenGetter config HOT 2
- Routes without jwt authentication are still loading HOT 1
- async TokenGetter doesn't work HOT 1
- Help needed to implement the basic functions HOT 1
- ERROR Error: Uncaught (in promise): TypeError: this.tokenGetter is not a function HOT 2
- Error: Could not get token from tokenGetter function HOT 1
- Bower failed with error: The process 'C:\npm\prefix\bower.cmd' failed with exit code 1
- Create Ivy distribution HOT 1
- Support Ivy distribution 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 angular-jwt.