docs: fix typos

This commit is contained in:
Geno 2021-09-16 01:04:43 +02:00
parent 42e8289f2f
commit 057f8045ed
5 changed files with 9 additions and 9 deletions

View File

@ -1,11 +1,11 @@
# UnifiedPush over XMPP # UnifiedPush over XMPP
[UnifiedPush](https://unifiedpush.org/) is an specification how push notifications delivered between application server and application. [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 delivere push notification over XMPP. This is an implementation of the UnifiedPush specifications to delievere push notification over XMPP.
In this project has following components: 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 - **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 ## XMPP Messages
@ -54,7 +54,7 @@ For the push notification it-self the origin `<message/>` is used with following
</message> </message>
``` ```
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 ## Wordings

View File

@ -143,7 +143,7 @@ func (s *XMPPService) message(msgHead stanza.Message, t xmlstream.TokenReadEncod
logger.Errorf("Error send unified push: %q", err) logger.Errorf("Error send unified push: %q", err)
return nil return nil
} }
logger.Infof("recieve unified push") logger.Infof("receive unified push")
return nil return nil
} }

View File

@ -2,7 +2,7 @@
The gateway is an XMPP Component and Webserver. 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 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. 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). 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).

View File

@ -14,7 +14,7 @@ func Post(r *gin.Engine, ws *web.Service, xmpp *XMPPService, jwtsecret JWTSecret
to, publicToken, err := jwtsecret.Read(c.Query("token")) to, publicToken, err := jwtsecret.Read(c.Query("token"))
if err != nil { if err != nil {
c.JSON(http.StatusUnauthorized, web.HTTPError{ c.JSON(http.StatusUnauthorized, web.HTTPError{
Message: "jwt token unauthoried - or not given", Message: "jwt token unauthorized - or not given",
Error: err.Error(), Error: err.Error(),
}) })
return return

View File

@ -154,7 +154,7 @@ func (h *XMPPUpHandler) HandleIQ(iq stanza.IQ, t xmlstream.TokenReadEncoder, sta
log.Errorf("sending register response: %v", err) log.Errorf("sending register response: %v", err)
} }
}() }()
log.Infof("recieved iq: %v", iq) log.Infof("received iq: %v", iq)
tokenData := messages.TokenData{} tokenData := messages.TokenData{}
err := xml.NewTokenDecoder(t).Decode(&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 endpoint := h.endpoint + "/UP?token=" + endpointToken
reply.IQ.Type = stanza.ResultIQ reply.IQ.Type = stanza.ResultIQ
reply.Register.Endpoint = &messages.EndpointData{Body: endpoint} reply.Register.Endpoint = &messages.EndpointData{Body: endpoint}
log.Debugf("generate respone: %v", endpoint) log.Debugf("generate response: %v", endpoint)
return nil return nil
} }