In many cases, point logon is a complicated design.
Now, a company is designing its own authentication center, that is, all systems send the login credential information to the authorization center,
If the center is verified successfully, a session is created and sent to your address to write cookies.
When you go to another sub-station, they will call your status in the authentication center and create a local session to log on to the authentication center if the status is correct.
However, this method is time-consuming and labor-consuming for general internal systems or systems with low security requirements.
Especially when the system has been formed, many enterprises need to spend a lot of time to transform the system, so it cannot slide.
It is a good method to create session login by using the key authentication method of WebService. Encryption
[Webmethod (enablesession = True )]
Public Bool Encryptconvert ( String UID)
... {
String Encrypttext = Convert. tobase64string (system. Text. encoding. Default. getbytes (encryptstring. Encrypt (UID). Replace ( " + " , " % 2B " ); // Encryption
If (Decrypt (encrypttext, UID )) // Call Decryption Method
... {
Session. Add (systemconst. key_cache_student, UID );
Return True;
}
Else
... {
Return False;
}
}
Read the previous articleArticleSomeone must have noticed the password-adding method. In the last sentence, the address is switched
It means to transmit the Encrypted Key to another system and decrypt it from another system. If the key pair is the same, create a session for the user to log on.
Note that the [webmethod (enablesession)= True)]
Otherwise, an error occurs.