-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
Added homeDomain check in WebAuthentication.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 I think this looks great. I left one suggestion (💡) that I don't think is required to support SEP-10 v3.0.0, but may be relevant depending on the use cases the SDK wishes to support.
@@ -145,6 +145,9 @@ public static class WebAuthentication | |||
if (operation.SourceAccount is null) | |||
throw new InvalidWebAuthenticationException("Challenge transaction operation must have source account"); | |||
|
|||
if (operation.Name.Split(' ')[0] != homeDomain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Clients will only ever read a transaction expecting a single home domain, but a server may wish to support multiple home domains and if the SDK wishes to support that use case the list of home domains passed into it maybe should be a collection. That's really up to you though for if that is an important use case to this SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, this is fixed now, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks for this.
Added homeDomain check in WebAuthentication.cs
Types of changes