Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on Wilma 2FA auth #1

Open
developerfromjokela opened this issue Aug 15, 2020 · 1 comment
Open

Documentation on Wilma 2FA auth #1

developerfromjokela opened this issue Aug 15, 2020 · 1 comment

Comments

@developerfromjokela
Copy link
Contributor

Wilma has OTP built-in.
kuva

Here's HTML source code:

  
<input type="hidden" id="mfa-formkey" value="passwd:56:e41c76b9c3a1917b5c2118613ebc67f4">

Dialog is not here. It's unnecessary.

Actual checking of that 2fa code is a POST request to: https://<wilmaserver>/api/v1/accounts/me/mfa/otp/check
Post Data:

  • payload: JSON object ({"otp":"<OTPCODE>"})
  • formkey: mfa-formkey from HTML

Failed response:

{
   "error":{
      "statusCode":400,
      "internalErrorCode":"mfa-001",
      "message":"Virheellinen kysely",
      "description":"Virheelliset parametrit"
   }
}

Invalid code response:

{"statusCode":200,"payload":{"success":false}}

Successful code response:

{"statusCode":200,"payload":{"success":true}}

After successul response, we can do Wilma requests as typically we do

@developerfromjokela developerfromjokela added the wontfix This will not be worked on label Aug 15, 2020
@developerfromjokela developerfromjokela removed the wontfix This will not be worked on label Sep 7, 2022
@developerfromjokela
Copy link
Contributor Author

MFA is now properly implemented, should be on included in wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant