auth

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckApiSign

func CheckApiSign(secretKey, projectKey, encodedData, providedSign string) bool

CheckApiSign validates correctness of provided (in HTTP API request) sign comparing it with generated one

func CheckChannelSign

func CheckChannelSign(secretKey, client, channel, channelData, providedSign string) bool

CheckChannelSign validates a correctness of provided (in subscribe client command) sign comparing it with generated one

func CheckClientToken

func CheckClientToken(secretKey, projectKey, user, timestamp, info, providedToken string) bool

CheckClientToken validates correctness of provided (by client connection) token comparing it with generated one

func GenerateApiSign

func GenerateApiSign(secretKey, projectKey, encodedData string) string

GenerateApiSign generates sign which is used to sign HTTP API requests

func GenerateChannelSign

func GenerateChannelSign(secretKey, client, channel, channelData string) string

GenerateChannelSign generates sign which is used to prove permission of client to subscribe on private channel

func GenerateClientToken

func GenerateClientToken(secretKey, projectKey, user, timestamp, info string) string

GenerateClientToken generates client token based on project secret key and provided connection parameters such as user ID, timestamp and info JSON string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL