Skip to content

Commit

Permalink
Implemented XMPP federation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ortuman committed Jul 6, 2018
1 parent cf281b8 commit d894153
Show file tree
Hide file tree
Showing 131 changed files with 7,655 additions and 4,485 deletions.
29 changes: 28 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ $ docker run --name jackal -p 5222:5222 ortuman/jackal
- [XEP-0160: Best Practices for Handling Offline Messages](https://xmpp.org/extensions/xep-0160.html)
- [XEP-0191: Blocking Command](https://xmpp.org/extensions/xep-0191.html)
- [XEP-0199: XMPP Ping](https://xmpp.org/extensions/xep-0199.html)
- [XEP-0220: Server Dialback](https://xmpp.org/extensions/xep-0220.html)
- [XEP-0237: Roster Versioning](https://xmpp.org/extensions/xep-0237.html)

## Join and Contribute
Expand Down
10 changes: 5 additions & 5 deletions auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ package auth
import (
"testing"

"github.com/ortuman/jackal/model"
"github.com/ortuman/jackal/storage"
"github.com/ortuman/jackal/storage/model"
"github.com/ortuman/jackal/stream"
"github.com/ortuman/jackal/xml"
"github.com/ortuman/jackal/xml/jid"
"github.com/pborman/uuid"
"github.com/stretchr/testify/require"
)
Expand All @@ -21,14 +21,14 @@ func authTestSetup(user *model.User) *stream.MockC2S {

storage.Instance().InsertOrUpdateUser(user)

jid, _ := xml.NewJID("mariana", "localhost", "res", true)
j, _ := jid.New("mariana", "localhost", "res", true)

testStrm := stream.NewMockC2S(uuid.New(), jid)
testStrm := stream.NewMockC2S(uuid.New(), j)
testStrm.SetUsername("mariana")
testStrm.SetDomain("localhost")
testStrm.SetResource("res")

testStrm.SetJID(jid)
testStrm.SetJID(j)
return testStrm
}

Expand Down
2 changes: 1 addition & 1 deletion auth/digest_md5.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"fmt"
"strings"

"github.com/ortuman/jackal/model"
"github.com/ortuman/jackal/storage"
"github.com/ortuman/jackal/storage/model"
"github.com/ortuman/jackal/stream"
"github.com/ortuman/jackal/util"
"github.com/ortuman/jackal/xml"
Expand Down
2 changes: 1 addition & 1 deletion auth/digest_md5_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"fmt"
"testing"

"github.com/ortuman/jackal/model"
"github.com/ortuman/jackal/storage"
"github.com/ortuman/jackal/storage/memstorage"
"github.com/ortuman/jackal/storage/model"
"github.com/ortuman/jackal/stream"
"github.com/ortuman/jackal/util"
"github.com/ortuman/jackal/xml"
Expand Down
2 changes: 1 addition & 1 deletion auth/plain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"encoding/base64"
"testing"

"github.com/ortuman/jackal/model"
"github.com/ortuman/jackal/storage"
"github.com/ortuman/jackal/storage/memstorage"
"github.com/ortuman/jackal/storage/model"
"github.com/ortuman/jackal/xml"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/scram.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"hash"
"strings"

"github.com/ortuman/jackal/model"
"github.com/ortuman/jackal/storage"
"github.com/ortuman/jackal/storage/model"
"github.com/ortuman/jackal/stream"
"github.com/ortuman/jackal/transport"
"github.com/ortuman/jackal/util"
Expand Down
4 changes: 3 additions & 1 deletion auth/scram_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ import (
"crypto/sha1"
"crypto/sha256"
"crypto/tls"
"crypto/x509"
"encoding/base64"
"fmt"
"hash"
"strconv"
"strings"
"testing"

"github.com/ortuman/jackal/storage/model"
"github.com/ortuman/jackal/model"
"github.com/ortuman/jackal/transport"
"github.com/ortuman/jackal/transport/compress"
"github.com/ortuman/jackal/util"
Expand All @@ -41,6 +42,7 @@ func (ft *fakeTransport) EnableCompression(compress.Level) { return }
func (ft *fakeTransport) ChannelBindingBytes(transport.ChannelBindingMechanism) []byte {
return ft.cbBytes
}
func (ft *fakeTransport) PeerCertificates() []*x509.Certificate { return nil }

type scramAuthTestCase struct {
id int
Expand Down
Loading

0 comments on commit d894153

Please sign in to comment.