Documentation ¶
Index ¶
- func AuthKeyFromBytes(bytes []byte) (*ecdsa.PrivateKey, error)
- func AuthKeyFromFile(filename string) (*ecdsa.PrivateKey, error)
- func VerifyJWT(token string, pub *ecdsa.PublicKey) (bool, error)
- type DeviceToken
- type DeviceTokenFunc
- type Handler
- type Push
- type PushFunc
- type Token
- type TokenPublicKeyFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthKeyFromBytes ¶
func AuthKeyFromBytes(bytes []byte) (*ecdsa.PrivateKey, error)
func AuthKeyFromFile ¶
func AuthKeyFromFile(filename string) (*ecdsa.PrivateKey, error)
Types ¶
type DeviceToken ¶
type DeviceTokenFunc ¶
type DeviceTokenFunc func(token string) *DeviceToken
type Handler ¶
type Handler struct { TokenPublicKey TokenPublicKeyFunc DeviceToken DeviceTokenFunc Push PushFunc }
func NewHandler ¶
func NewHandler(keyFunc TokenPublicKeyFunc, tokenFunc DeviceTokenFunc, pushFunc PushFunc) *Handler
type Token ¶
func DecodeToken ¶
type TokenPublicKeyFunc ¶
Click to show internal directories.
Click to hide internal directories.