Microservice architecture integrates Sa-Token to implement gateway authentication and authentication services

Microservice architecture integrates Sa-Token to implement gateway authentication and authentication services This project is a hands-on project I made, using the SpringCloudAlibaba microservice architecture. When I was working on the authentication module, I remembered the Sa-Token project I had seen online before. It was called the Light of Domestic Authentication, so I checked their documentation […]

Jmeter multi-user token usage problem

Focus on sharing useful software testing content, welcome to like Collect ?Leave a message Please correct me if there are any errors! Communication and discussion: Join 1,000 people in the software testing technology learning and exchange group Resource sharing: After joining ByteDance, I realized how important this information given by my senior brother is! The […]

Custom Graph Component: 1.1-JiebaTokenizer specific implementation

JiebaTokenizer class inherits from Tokenizer class, and Tokenizer class inherits from GraphComponent class, and GraphComponent class inherits from ABC class (abstract base class). This article uses the example in “Using ResponseSelector to Implement Campus Recruitment FAQ Robot” to mainly explain in detail the specific implementation of the methods in the JiebaTokenizer class. 0. List of […]

Front-end authentication: cookie, session, token, jwt, single sign-on

Front-end authentication: cookie, session, token, jwt, single sign-on 1. Stateless HTTP protocol Stateless means that the protocol has no memory ability for transaction processing. The lack of state means that if the previous information is needed later, it must be retransmitted, which may result in a large amount of data transmitted per connection. The stateless […]

Java implements single sign-on (token)

Single sign-on implementation (java) 1. Import dependent JWT <!– JWT–> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>0.7.0</version> </dependency> 2. Write application.yml server: port: 9006 spring: cloud: nacos: discovery: server-addr: 192.168.1.6:8848 datasource: url: jdbc:mysql://localhost:3306/mybatis-plus?useUnicode=true &characterEncoding=utf-8 &rewriteBatchedStatements=true &useSSL=true &serverTimezone=GMT+8 username: root password: 12345 driver-class-name: com.mysql.cj.jdbc.Driver mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 3. Write Utils JwtUtils package com.wen.utils; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jws; import […]

ChatGLM2 source code analysis: `ChatGLMTokenizer`

import os import torch from typing import List, Optional, Union, Dict from sentencepiece import SentencePieceProcessor from transformers import PreTrainedTokenizer from transformers.utils import logging, PaddingStrategy from transformers.tokenization_utils_base import EncodedInput, BatchEncoding # The underlying tokenizer, which is the packaging of the SP model class SPTokenizer: def __init__(self, model_path: str): # reload tokenizer assert os.path.isfile(model_path), model_path #Load the […]

Cookie, Session, token, JWT, SSO

Start with status “HTTP Stateless” We know that HTTP is stateless. In other words, the HTTP requester and responder cannot maintain state, it is all one-time, and it does not know what happened in the previous and subsequent requests. But in some scenarios, we need to maintain state. The most typical example is that when […]

Interpret the token of the large model (LLM)

When people talk about the size of large language models, the parameters give us an idea of how complex the neural network’s structure is, and the token size gives us an idea of how much data was used to train the parameters. As Dr. Lu Qi said, large language models provide impressive capabilities for various […]