Package org.molgenis.security.twofactor
Class TwoFactorAuthenticationController
- java.lang.Object
-
- org.molgenis.security.twofactor.TwoFactorAuthenticationController
-
@Controller @RequestMapping("/2fa") public class TwoFactorAuthenticationController extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTRIBUTE_2FA_SECRET_KEYstatic StringTWO_FACTOR_ACTIVATION_URIstatic StringTWO_FACTOR_CONFIGURED_URIstatic StringURI
-
Constructor Summary
Constructors Constructor Description TwoFactorAuthenticationController(TwoFactorAuthenticationProvider authenticationProvider, TwoFactorAuthenticationService twoFactorAuthenticationService, RecoveryAuthenticationProvider recoveryAuthenticationProvider, OtpService otpService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringactivation(org.springframework.ui.Model model)Stringauthenticate(org.springframework.ui.Model model, String verificationCode, String secretKey)Stringconfigured()StringrecoverAccount(org.springframework.ui.Model model, String recoveryCode)Stringvalidate(org.springframework.ui.Model model, String verificationCode)
-
-
-
Field Detail
-
URI
public static final String URI
- See Also:
- Constant Field Values
-
TWO_FACTOR_ACTIVATION_URI
public static final String TWO_FACTOR_ACTIVATION_URI
- See Also:
- Constant Field Values
-
ATTRIBUTE_2FA_SECRET_KEY
public static final String ATTRIBUTE_2FA_SECRET_KEY
- See Also:
- Constant Field Values
-
TWO_FACTOR_CONFIGURED_URI
public static final String TWO_FACTOR_CONFIGURED_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TwoFactorAuthenticationController
public TwoFactorAuthenticationController(TwoFactorAuthenticationProvider authenticationProvider, TwoFactorAuthenticationService twoFactorAuthenticationService, RecoveryAuthenticationProvider recoveryAuthenticationProvider, OtpService otpService)
-
-
Method Detail
-
configured
@GetMapping("/authenticate") public String configured()
-
validate
@PostMapping("/validate") public String validate(org.springframework.ui.Model model, @RequestParam String verificationCode)
-
activation
@GetMapping("/activation") public String activation(org.springframework.ui.Model model)
-
authenticate
@PostMapping("/activation/authenticate") public String authenticate(org.springframework.ui.Model model, @RequestParam String verificationCode, @RequestParam String secretKey)
-
-