utils

package
v0.0.0-...-0172641 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasAuthToken

func HasAuthToken(ctx context.Context) (bool, error)

HasAuthToken checks if md in ctx has auth

func TokenClaims

func TokenClaims(token string) (map[string]interface{}, error)

TokenClaims parses a JWT token and returns it's body claims

func TokenClaimsFromContext

func TokenClaimsFromContext(ctx context.Context) (map[string]interface{}, error)

TokenClaimsFromContext fetches token claims via context

func ValidateAuthClaims

func ValidateAuthClaims(ctx context.Context) (jwt.MapClaims, error)

ValidateAuthClaims validates a token in the Authorization header and returns claims map

func ValidateAuthToken

func ValidateAuthToken(ctx context.Context, token string) (bool, error)

ValidateAuthToken validates a token using the passport service

Types

This section is empty.

Jump to

Keyboard shortcuts

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