File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/accolite/pru/health/AuthApp/controller Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 44import org .springframework .ui .ModelMap ;
55import org .springframework .web .bind .annotation .GetMapping ;
66import org .springframework .web .bind .annotation .RequestParam ;
7+ import org .springframework .web .servlet .support .ServletUriComponentsBuilder ;
8+ import org .springframework .web .util .UriComponentsBuilder ;
79
810@ Controller
911public class WebController {
1012
1113 @ GetMapping ("/password/reset" )
1214 public String resetPassword (@ RequestParam (value = "token" ) String token , ModelMap model ) {
13- String url = "/api/auth/password/reset?token=" + token ;
15+ UriComponentsBuilder urlBuilder = ServletUriComponentsBuilder .fromCurrentContextPath ()
16+ .path ("/api/auth/password/reset" );
17+ String url = urlBuilder .queryParam ("token" , token ).toUriString ();
1418 model .addAttribute ("url" , url );
1519 return "reset-password" ;
1620 }
You can’t perform that action at this time.
0 commit comments