auth

package
v0.0.0-...-c7bb042 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuth

func GetAuth(c echo.Context) error

GetAuth returns the authentication mode that is enabled for Response.

Types

type JwtTokenClaims

type JwtTokenClaims struct {
	jwt.StandardClaims
	Name string `json:"name"`

	Response NamespacedClaims `json:"https://hasura.io/jwt/claims"`
}

JwtTokenClaims is the token claims to be added to the token.

type NamespacedClaims

type NamespacedClaims struct {
	AllowedRoles []string `json:"x-hasura-allowed-roles"`
	DefaultRole  string   `json:"x-hasura-default-role"`

	UserID string `json:"x-hasura-user-id"`
}

NamespacedClaims are the claims handled within the hasura.io namespace.

Jump to

Keyboard shortcuts

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