I want to understand what token-based authentication means. I searched the internet but couldn't find anything understandable.
相关问题
- Strong parameter override for DeviseTokenAuth cont
- “Zero out” sensitive String data in Swift
- java client program to send digest authentication
- High cost encryption but less cost decryption
- PHP persistent login - Do i reissue a cookie after
相关文章
- ASP.NET MVC 后台 + 微信小程序
- Warning : HTML 1300 Navigation occured?
- Security concerns about CORS
- How do I prevent SQL injection with ColdFusion
- User.Identity.IsAuthenticated vs WebSecurity.IsAut
- Android Studio - Get Firebase token from GetIdToke
- SwiftUI - Vertical Centering Content inside Scroll
- Override UserManager in django
When you register for a new website, often you are sent an email to activate your account. That email typically contains a link to click on. Part of that link, contains a token, the server knows about this token and can associate it with your account. The token would usually have an expiry date associated with it, so you may only have an hour to click on the link and activate your account. None of this would be possible with cookies or session variables, since its unknown what device or browser the customer is using to check emails.
A
token
is a piece of data which onlyServer X
could possibly have created, and which contains enough data to identify a particular user.You might present your login information and ask
Server X
for atoken
; and then you might present yourtoken
and askServer X
to perform some user-specific action.Token
s are created using various combinations of various techniques from the field of cryptography as well as with input from the wider field of security research. If you decide to go and create your owntoken
system, you had best be really smart.A token is a piece of data created by server, and contains information to identify a particular user and token validity. The token will contain the user's information, as well as a special token code that user can pass to the server with every method that supports authentication, instead of passing a username and password directly.
Token-based authentication is a security technique that authenticates the users who attempt to log in to a server, a network, or some other secure system, using a security token provided by the server.
An authentication is successful if a user can prove to a server that he or she is a valid user by passing a security token. The service validates the security token and processes the user request.
After the token is validated by the service, it is used to establish security context for the client, so the service can make authorization decisions or audit activity for successive user requests.
visit the source
The question is old and the technology has advanced, here is the current state:
JSON Web Token (JWT) is a JSON-based open standard (RFC 7519) for passing claims between parties in web application environment. The tokens are designed to be compact, URL-safe and usable especially in web browser single sign-on (SSO) context.
https://en.wikipedia.org/wiki/JSON_Web_Token
From Auth0.com
It's just hash which is associated with user in database or some other way. That token can be used to authorize a user to access other related contents of the application. To retrieve this token on client side login is required. After first time login you need to save retrieved token not any other data like session, session id because here everything is token to access other resources of application.
Token is used to assure the authenticity of the user.