Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jwt]

JSON Web Token (JWT, pronounced "jot") is an emerging type of token-based authentication used in space-constrained environments such as HTTP Authorization headers.

-2
votes
0answers
19 views

JWT vs simple token authentication in REST API [on hold]

I wanted to use JWT (to learn it) in django-rest-framework instead of the built-in TokenAuthentication so I added ...
4
votes
0answers
55 views

JWT Authentication Service

Recently I've built a service at my work to generate tokens with JWT (JSON Web Token) "protocol", I would like to show you the code and to get comments from you if that's good enough and if there are ...
3
votes
2answers
110 views

JWT authentication between Django and ReactJS

I am currently using Django (2.1) to build an API, and I have added djangorestframework-jwt to manage JWT. Here is the configuration: ...
2
votes
1answer
61 views

Create annotation to validate JWT in Spring controller instead of filter

I developed a Spring RESTful service that uses a JWT for authorization. To the validity of this JWT, i used two different implementations. Create a filter to intercept every request and validate ...
3
votes
0answers
71 views

Implementing secure API for use between other internal apps

My team and I are trying to implement a secure API and would appreciate some feedback on the following: If there are areas of improvement in the current code to improve security Recommendations on ...
2
votes
0answers
44 views

JWT implementation in Crystal

I'm trying to learn Crystal. I made this to create a web token for authorization. I keep it updated on github. Here is how I use it: ...
8
votes
1answer
2k views

Spring JWT authentication using cookies

I'm working on a experimental code which allows users to authorize using JWT's jjwt library. Here's what I have done so far on authentication and authorization flow....
2
votes
1answer
128 views

Json Web Token-like implementation in Rust

I am new to Rust. I am making this to help me learn better. This code has two functions: ::make() and ::get_payload(). ...
1
vote
1answer
170 views

Storing JWT in client side and putting tokens in all the future request

I have started using NodeJS with Express JS and PassportJS and JWT for User Authentication. I am able to authenticate the user and generate JWT Token. I am using Bootstrap for my front-end. By using ...
1
vote
2answers
299 views

JWT Authentication for REST API

Here is my code to implement authentication in a Node/Express/Sequelize project. This is my first time using JWT and I would appreciate any help! ...
3
votes
0answers
2k views

Generating public/private RSA key pair programmatically, using it for JWTs

In my app I'm using JSON Web Tokens for authentication purposes, using the pyjwt library. Instead of using static keys and/or worrying about key distribution, the server generates a public/private key ...
1
vote
0answers
168 views

“RESTful” node.js server using express

I have attempted to construct a simple RESTful node server that allows for user authentication using passport and jwt: ...
0
votes
1answer
5k views

Simple login using ReactJS

I have successfully implemented a simple login page using ReactJS by coding it all in JavaScript (a flexibility that I like) but I am still a beginner in React and would like to know whether this is ...
1
vote
2answers
77 views

Logging in with multiple types of info

I'm trying to let users log in with multiple columns (e.g. ID, email, phone). If one fails, it checks the next column. I would like to minimise my if and ...
7
votes
1answer
344 views

OAuth2 Implementation

I am trying to implement an OAuth2 service. I am not planning to use it anytime soon (like will write unit tests). This is my fun project I do to practice. I have used the python_jwt library to create ...
3
votes
0answers
13k views

JWT - Simple API example

I have created this fake API just because I want to learn how to use JWT. It is a simple unsigned token exchange with two methods call: login and adminPassword. I've used https://github.com/lcobucci/...
2
votes
0answers
2k views

JWT with Firebase php-jwt

So my web app requires JWT authentication and I decided to make a mockup wrapper class for php-jwt before implementing it into my web app: ...
1
vote
1answer
122 views

Generic JWT Handler

I'm developing a Go REST service that uses JWT (JSON Web Tokens) for authentication. I've written a JWTHandler which validates the token using a Validation Handler. If validation succeeds, the ...
3
votes
0answers
2k views

Web API 2 - JWT with X509 certificate

I got my JWT generation working with X509 and wanted to ask if you would recommend any changes in respect to: Signing certificate storing / handling. Publishing for anonymous access public key ...
9
votes
1answer
13k views

Authentication with JWT

Please review my code for 'JWT' authentication. Are there any security issues? Where should I store the secret's key, DB or InMemory? What's a good 'JWT' Lifetime? Should I send the 'JWT' in Header ...
14
votes
1answer
27k views

Web API 2 authentication with JWT

Please review my code for bearer token (JWT) authentication of Web API 2 (Self Hosted using OWIN) Are there any security issues in the implementation? Quick overview: Token creation and validation ...