-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for One-Time Password authentication #6
Comments
Hey, why not open a ticket for this in the freedesktop bugzilla against telepathy-spec? I would have never noticed it here... First of all, a very discouraging question :P Why not just use Chan.I.SASLAuthentication? It seems to me that they are a lot similar, we just need to define new 'mechanisms'. The only problem seems to be that the available methods can change here, while SASLAuthentication doesn't allow that. This could be changed, though... Some things that I don't understand:
Some requests:
|
@gkiagia I decided to open the issue only after wrote the mail to you. Firstly I thought to polish it alone (because I'm the only developer of the interested component (telepathy-morse)).
I thought a lot on this idea, but then decided that a different, clear interface would be better, than overloaded SASL. "Specific API" vs "SASL fit all". Like SASL, this interface can be used for anything (not only auth) at any time of connection.
Done. The first section is "Use case" now.
This is why I added Phone Number argument to UseMethod(). Telegram requires phone number to be an account parameter, but other protocols might need phone verification for any random reason. E.g. we have "Account balance" interface. It is pretty possible to use phone verification to add some money to the balance. The phone can be not associated with the account. |
Add Channel.Interface.OTPAuthentication
The interface is inspired by Channel.Interface.SASLAuthentication.
The description is outdated (written for Channel.Interface.PhoneVerification, which would be generalised to One-time password Authentication).
Use case
The interface would be exposed by telepathy-morse (telegram connection manager). Sign in process would be follow:
or
Properties
VerificationStatus - Verification_Status.
Read only.
AvailableMethods - as (array of strings).
Read only, can be changed.
Method list depends on protocol and server. Well-known values would be:
CanTryAgain - b (bool)
Since v2
DefaultPhoneNumber - s (string)
Since v2
Read only, can be empty.
Predefined phone number, which will receive the message or the call.
Signals
VerificationStatusChanged(Verification_Status newStatus)
AvailableMethodsChanged(as newAvailableMethods)
Sometimes you can get a call only if you already tried to get sms and not received it yet (Telegram case).
PasswordSent(a{sv} details)
Possible optional keys:
Methods
UseMethod(string method, string phone) -> void
Activate the "method" to get a code on passed phone number.
The phone argument can be not associated with the account, or can be not permanent for some protocol/server/etc.
Probably this argument would be needed by Telegram CM to perform change of the user phone number.
Artificial use case can be phone verification to connect to some room in jabber, or (as we have "Account balance" interface), it is pretty possible to use phone verification to add some money to the balance. You send phone number, server replies you with a code, you send it back and ooop - you just confirmed a transfer of 5$ from the phone number balance.
Respond(string code) -> void
Try to complete verification with the "code".
Types
Verification_Status - u (uint)
The text was updated successfully, but these errors were encountered: