wholesale jewelry oklahoma city How should programmers design more elegant token certification methods?

wholesale jewelry oklahoma city

5 thoughts on “wholesale jewelry oklahoma city How should programmers design more elegant token certification methods?”

  1. italian jewelry wholesale silver Save the certification information on the client. The key point is security verification. If the security issues of the certification information can be solved, the certification information can be saved on the client. a lot of. Regarding the security solution of information, the general approach is now the signature mechanism. The verification method of the WeChat public interface is based on the signature mechanism. Signature is a digital string that can only be produced by the sender of information. This digital strings are also an effective proof of sending information authenticity of information senders. When the user successfully entered the system and the validity is valid, the server will use a mechanism to generate a token string. This token can contain a lot of information, such as the source IP, expired time, user information, etc., and send this string to the customer under the customer. Duan, every request for each client

    is carried with this token. The carrying method is actually very free. Consultation can only be consistent. Of course I don't recommend cookies here. When the server receives the request, take out token to verify (can verify the source IP, expires time and other information), and it is allowed to perform operations if the law is allowed. The verification method based on Token is also an authentication method for modern Internet use, so what advantages it has

    1. Support cross -domain access, cookie does not allow access to access, this is the token mechanism for the token mechanism It does not exist, provided that the transmitted user authentication information is transmitted through the HTTP header.
    2. No state: Token mechanism does not need to store session information on the server side, because the token itself contains all the information of all login users, only to be on the information of all login users, only need to be on the information, only need to be on the information, only need to be on the login user. COOKIE or local media storage status information.
    3. Dealing does not need to be bound to a specific authentication scheme. Token can be generated anywhere, as long as your API is called, you can generate token generating calls.

    4. Applicability is more more Guang: As long as it is a client that supports the HTTP protocol, you can use token certification.
    5. The server only needs to verify the security of the token, and there is no need to obtain the login user information, because the user's login information is already in the token information. rn6.基于标准化:你的API可以采用标准化的JSON Web Token (JWT). 这个标准已经存在多个后端库(.NET, Ruby, Java,Python,PHP)和多家公司的支持( Such as: Firebase, Google, Microsoft).

  2. brighton jewelry wholesale If the API is designed as a standard stateless RESTFUL, consider using Token
    If the API is consumed by different terminals, cookies are limited, consider Token

  3. turkish jewelry supplies wholesale In order to get the signature section, you must have the coded header, the encoded Payload, and a secret (this key is only known to the server). The signature algorithm is specified in the header, but the signature can be signed for them.

Leave a Comment