Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimedHMAC ¶
type TimedHMAC struct {
// contains filtered or unexported fields
}
TimedHMAC generates a token with TTL and uses a pre-shared secret known to the relay server
func NewTimedHMAC ¶
NewTimedHMAC creates a new TimedHMAC instance
func (*TimedHMAC) GenerateToken ¶
GenerateToken generates new time-based secret token - basically Payload is a unix timestamp and Signature is a HMAC hash of a timestamp with a preshared TURN secret
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
TokenStore is a simple in-memory store for token With this can update the token in thread safe way
func (*TokenStore) TokenBinary ¶
func (a *TokenStore) TokenBinary() []byte
func (*TokenStore) UpdateToken ¶
func (a *TokenStore) UpdateToken(token *Token) error
Click to show internal directories.
Click to hide internal directories.