Tag:Token authentication

  • . net # core # API interface JWT authentication token

    Time:2022-4-29

    1、 Project > manage nuget package installation 2、 appsettings. JSON add “JWT”: { “Secret”: “~! @#$% ^ & * () qwertyuiopasldkh[o51485421ajshk ^% *) Kasd”, // key “Issuer”: “kfjdhf”, // issuer “Audience”: “kfjdhf”, // receiver //”Expired”: 30 // expiration time (30min) } 3、 Configureservices injection JWT #Region register JWT //Get profile var JWTConfig = Configuration.GetSection(“JWT”); //Generate […]

  • Single sign on (to be summarized)

    Time:2022-4-24

    1. Single server login: (no cluster, no distributed)(1) Using session objectAfter successful login. Put the user data in the session. session. setAttribute(“name”,user) Judge whether to log in. Get the data from the session to get the login. Session. getAttribute(“name”)Session default expiration time: 30 minutes 2. SSO mode (single sign on): There are three common ways […]