jwtauth

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package jwtauth contains JWT-related helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAPIAccessToken

func BuildAPIAccessToken(sdkKey string, ttl time.Duration, key []byte) (tokenString string, expires int64, err error)

BuildAPIAccessToken returns a token for accessing the API service using the argument SDK key and TTL. It also returns the expiration timestamp.

func BuildAdminAccessToken

func BuildAdminAccessToken(ttl time.Duration, key []byte) (tokenString string, expires int64, err error)

BuildAdminAccessToken returns a token for accessing the Admin service using the argument TTL. It also returns the expiration timestamp.

func MatchClientSecret

func MatchClientSecret(reqSecretStr string, configSecret []byte) bool

MatchClientSecret compares secret keys

Types

This section is empty.

Jump to

Keyboard shortcuts

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