Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAccessKey ¶
GenerateAccessKey generates a new ODIN access key.
Types ¶
type KeyPair ¶
type KeyPair struct { PublicKey ed25519.PublicKey SecretKey ed25519.PrivateKey }
func LoadAccessKey ¶
LoadAccessKey validates and loads a key pair from an ODIN access key.
type TokenGenerator ¶
type TokenGenerator struct { KeyId string SecretKey ed25519.PrivateKey }
TokenGenerator generates tokens for ODIN network access.
func NewTokenGenerator ¶
func NewTokenGenerator(credentials interface{}) (*TokenGenerator, error)
NewTokenGenerator creates a TokenGenerator from either an access key or key pair.
func (*TokenGenerator) CreateToken ¶
func (tg *TokenGenerator) CreateToken(roomId string, userId string, options TokenOptions) (string, error)
CreateToken creates a signed JWT token to access the ODIN room.
Click to show internal directories.
Click to hide internal directories.