Add XEP-0070: Verifying HTTP Requests via XMPP support#557
Add XEP-0070: Verifying HTTP Requests via XMPP support#557cmeng-git wants to merge 4 commits intoigniterealtime:masterfrom
Conversation
Flowdalic
left a comment
There was a problem hiding this comment.
I usually do not add new features to stable Smack branches, so please adjust the target branch to master.
Flowdalic
left a comment
There was a problem hiding this comment.
First round of review. I think especially the manager design needs to be changed.
...imental/src/main/java/org/jivesoftware/smackx/httpauthorizationrequest/packet/ConfirmIQ.java
Outdated
Show resolved
Hide resolved
...imental/src/main/java/org/jivesoftware/smackx/httpauthorizationrequest/packet/ConfirmIQ.java
Outdated
Show resolved
Hide resolved
|
|
||
| private final String id; | ||
| private final String method; | ||
| private final String url; |
There was a problem hiding this comment.
| private final String url; | |
| private final URI url; |
I believe this member should be of type URI.
There was a problem hiding this comment.
Can this variable be handled as a string all the ways. Otherwise need to do extract steps during xml phrase() and in toXML() method.
In aTalk app implementation, the value is used as string in prompting user to accept or reject the auth request. Do not see the need for app to access the URL directly.
There was a problem hiding this comment.
The URI class is not intended to be in fields. So please keep as a string
There was a problem hiding this comment.
The URI class is not intended to be in fields.
Care to elaborate on that?
There was a problem hiding this comment.
The URI class has a lot of internal fields, the object size itself is 80 bytes and each internal string adds more and more e.g. URI.create("https://github.com/igniterealtime/Smack/pull/557") took 400 bytes in memory (checked with JOL).
And the parsing itself also needs for CPU.
But there is no any logic that needs the parsed URI. We just need to show the link to a user.
...al/src/main/java/org/jivesoftware/smackx/httpauthorizationrequest/provider/package-info.java
Outdated
Show resolved
Hide resolved
...ntal/src/main/java/org/jivesoftware/smackx/httpauthorizationrequest/packet/package-info.java
Outdated
Show resolved
Hide resolved
...tal/src/main/java/org/jivesoftware/smackx/httpauthorizationrequest/element/package-info.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/jivesoftware/smackx/httpauthorizationrequest/element/ConfirmExtension.java
Outdated
Show resolved
Hide resolved
...n/java/org/jivesoftware/smackx/httpauthorizationrequest/HTTPAuthorizationRequestManager.java
Outdated
Show resolved
Hide resolved
...n/java/org/jivesoftware/smackx/httpauthorizationrequest/HTTPAuthorizationRequestManager.java
Outdated
Show resolved
Hide resolved
...n/java/org/jivesoftware/smackx/httpauthorizationrequest/HTTPAuthorizationRequestManager.java
Outdated
Show resolved
Hide resolved
|
|
||
| private final String id; | ||
| private final String method; | ||
| private final String url; |
There was a problem hiding this comment.
The URI class is not intended to be in fields. So please keep as a string
Add XEP-0070: Verifying HTTP Requests via XMPP support