2019-02-03 20:56:58 +01:00
|
|
|
package peering
|
|
|
|
|
|
|
|
import jwt "github.com/dgrijalva/jwt-go"
|
|
|
|
|
|
|
|
const (
|
|
|
|
AdvertisePath = "/advertise"
|
|
|
|
UpdatePath = "/update"
|
|
|
|
PingPath = "/ping"
|
|
|
|
)
|
|
|
|
|
|
|
|
type AdvertisingRequest struct {
|
|
|
|
Attributes PeerAttributes
|
|
|
|
PublicKey []byte
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateRequest struct {
|
|
|
|
Attributes PeerAttributes
|
|
|
|
}
|
|
|
|
|
2019-02-22 17:35:49 +01:00
|
|
|
type ClientTokenClaims struct {
|
2019-02-03 20:56:58 +01:00
|
|
|
jwt.StandardClaims
|
|
|
|
BodySum []byte `json:"bodySum"`
|
|
|
|
}
|
2019-02-22 17:35:49 +01:00
|
|
|
|
|
|
|
type ServerTokenClaims struct {
|
|
|
|
jwt.StandardClaims
|
|
|
|
PeerID PeerID `json:"peerID"`
|
|
|
|
}
|