How do I look like the usual transaction confirmation procedure on multiple sites?

I want to look like a typical transaction confirmation procedure on several websites. When a user registers an email, a confirmation link is sent to him. As soon as the user navigates to this confirmation link, his account will be confirmed. Do not worry about the process of sending emails . The thing is, I need to create a URL that a user can log in to verify their new account. This page will have to get some parameters, but I don't want the url to be something like ... / confirm? UserId = 1. I want this to be an encrypted URL to avoid abuse, is this possible? So far, I have something like this:

 public class CancelReservationPage extends WebPage{

 public CancelReservationPage(PageParameters pageParameters){
  // get parameters
  // confirm account
  // etc..
 }
}

What's next?

Thank!

+3
3

, . , 12 char long, .

+2

, , , , ( ).

URL-, userId hash(userId + secretKey), secretKey - , hash - - SHA-1. , , , , .

SHA-1 java.security.MessageDigest Apache Commons Codec DigestUtls.shaHex().

, .

+2

:

  • , ( , GUID).
  • URL ,
  • , , , .
  • ,
+1
source

Source: https://habr.com/ru/post/1764328/


All Articles