From 057f8045edfeb2d56af839857ea7c6d3f7cc07f9 Mon Sep 17 00:00:00 2001 From: Geno Date: Thu, 16 Sep 2021 01:04:43 +0200 Subject: [PATCH] docs: fix typos --- README.md | 8 ++++---- distributor/xmpp.go | 2 +- gateway/README.md | 2 +- gateway/web_post.go | 2 +- gateway/xmpp.go | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 916688c..892068f 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # UnifiedPush over XMPP -[UnifiedPush](https://unifiedpush.org/) is an specification how push notifications delivered between application server and application. -This is an implementation of the UnifiedPush specifications to delivere push notification over XMPP. +[UnifiedPush](https://unifiedpush.org/) is an specification how push notifications delieveries between application server and application. +This is an implementation of the UnifiedPush specifications to delievere push notification over XMPP. In this project has following components: - **Gateway** (also called an Push Provider or [Server](https://unifiedpush.org/spec/server/)) which could be registered as an XMPP Component on an Server -- **Distributor** for Linux using the [D-Bus Specification](https://unifiedpush.org/spec/dbus/) which implement an very small XMPP-Client to recieve the push notifications +- **Distributor** for Linux using the [D-Bus Specification](https://unifiedpush.org/spec/dbus/) which implement an very small XMPP-Client to receive the push notifications ## XMPP Messages @@ -54,7 +54,7 @@ For the push notification it-self the origin `` is used with following ``` -The message sender `from` should be validated from distributor, for not recieving invalid or manipulated push Messages. +The message sender `from` should be validated from distributor, for not receiving invalid or manipulated push Messages. ## Wordings diff --git a/distributor/xmpp.go b/distributor/xmpp.go index ce73839..844bc07 100644 --- a/distributor/xmpp.go +++ b/distributor/xmpp.go @@ -143,7 +143,7 @@ func (s *XMPPService) message(msgHead stanza.Message, t xmlstream.TokenReadEncod logger.Errorf("Error send unified push: %q", err) return nil } - logger.Infof("recieve unified push") + logger.Infof("receive unified push") return nil } diff --git a/gateway/README.md b/gateway/README.md index 5a0c2a7..0937e0e 100644 --- a/gateway/README.md +++ b/gateway/README.md @@ -2,7 +2,7 @@ The gateway is an XMPP Component and Webserver. -The Webserver recieve notificatons from application server by using an JWT-Token as Endpoint Token. +The Webserver receive notifications from application server by using an JWT-Token as Endpoint Token. The Signature JWT-Token is validated, so that only the Token generated by this gateway could be used (and no spaming over this Gateway is possible). The JWT-Token contains the XMPP-Address of the Distributor, so that this Gateway does not require to store anything. Current the JWT-Token is not encrypted like in [RFC 7516(https://tools.ietf.org/html/rfc7516) as an JWE [we are working on it](https://dev.sum7.eu/genofire/unified-push-xmpp/issues/5). diff --git a/gateway/web_post.go b/gateway/web_post.go index 954346d..cab2981 100644 --- a/gateway/web_post.go +++ b/gateway/web_post.go @@ -14,7 +14,7 @@ func Post(r *gin.Engine, ws *web.Service, xmpp *XMPPService, jwtsecret JWTSecret to, publicToken, err := jwtsecret.Read(c.Query("token")) if err != nil { c.JSON(http.StatusUnauthorized, web.HTTPError{ - Message: "jwt token unauthoried - or not given", + Message: "jwt token unauthorized - or not given", Error: err.Error(), }) return diff --git a/gateway/xmpp.go b/gateway/xmpp.go index b03d6cc..e6e794c 100644 --- a/gateway/xmpp.go +++ b/gateway/xmpp.go @@ -154,7 +154,7 @@ func (h *XMPPUpHandler) HandleIQ(iq stanza.IQ, t xmlstream.TokenReadEncoder, sta log.Errorf("sending register response: %v", err) } }() - log.Infof("recieved iq: %v", iq) + log.Infof("received iq: %v", iq) tokenData := messages.TokenData{} err := xml.NewTokenDecoder(t).Decode(&tokenData) @@ -178,7 +178,7 @@ func (h *XMPPUpHandler) HandleIQ(iq stanza.IQ, t xmlstream.TokenReadEncoder, sta endpoint := h.endpoint + "/UP?token=" + endpointToken reply.IQ.Type = stanza.ResultIQ reply.Register.Endpoint = &messages.EndpointData{Body: endpoint} - log.Debugf("generate respone: %v", endpoint) + log.Debugf("generate response: %v", endpoint) return nil }