-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support for animated QR code #12
Comments
And do something like this to generate the QR-code?
|
I'm not sure that I understand your example 100%, but yes qrAuthCode would have to be computed, and the correct binary would have to be constructed. |
I'm referring to this:
It's a nice library you've built, will see if I get the time to do this :) |
Great, we are on the same page! 👍 |
Hi, I want to integrate swedish bankid with wordpress, so that anyone can signup, signin, show interest in custom post using bankid authorization. Could you please help me or tell me the way of solve this issue. Thanks in advance. Regares |
Hej! I would like to help out on this issue. Will get back to you with a PR. Great job with this library. I would like to offer more support in development and maintenance going forward, if you don't mind. Kind regards, |
Hey again 👋🏻 @Preen, I looked into this a while ago (judging by my comment above) and there is no longer a
I think that the below would work. defmodule QRTestModule do
def generate_qr(qr_start_token, qr_start_secret, time) do
digest =
:crypto.mac(:hmac, :sha256, String.to_charlist(qr_start_secret), String.to_charlist(time))
|> Base.encode16(case: :lower)
"bankid." <> qr_start_token <> "." <> time <> "." <> digest
end
end It would then be used like this using the same numbers as in the documentation that you posted a screenshot of (a few years ago 🙃). result =
QRTestModule.generate_qr(
"67df3917-fa0d-44e5-b327-edcc928297f8",
"d28db9a7-4cde-429e-a983-359be676944c",
"0"
)
expected =
"bankid.67df3917-fa0d-44e5-b327-edcc928297f8.0.dc69358e712458a66a7525beef148ae8526b1c71610eff2c16cdffb4cdac9bf8"
result == expected Aaand it works on my machine 😇
|
Add support for generating animated QR-codes. 4.2
The text was updated successfully, but these errors were encountered: