builder

package
v0.0.1-alpha4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HasuraClaimsBuilder = builder.Register(hasuraClaimsBuilder{}, HasuraClaims{}).(hasuraClaimsBuilder)
View Source
var StandardClaimsBuilder = builder.Register(standardClaimsBuilder{}, jwt.StandardClaims{}).(standardClaimsBuilder)

Functions

This section is empty.

Types

type BuilderService

type BuilderService struct {
	// contains filtered or unexported fields
}

func NewBuilderService

func NewBuilderService(cfg *context.Config) *BuilderService

func (*BuilderService) BuildCustomClaims

func (b *BuilderService) BuildCustomClaims(user *model.User) *CustomClaims

type CustomClaims

type CustomClaims struct {
	StandardClaims jwt.StandardClaims
	HasuraClaims   HasuraClaims `json:"https://hasura.io/jwt/claims"`
}

func (CustomClaims) Valid

func (c CustomClaims) Valid() error

hacky but I did'nt find better wsay to do this

type HasuraClaims

type HasuraClaims struct {
	AllowedRoles []string `json:"x-hasura-allowed-roles"`
	Role         string   `json:"x-hasura-role"`
	DefaultRole  string   `json:"x-hasura-default-role"`
	UserID       string   `json:"x-hasura-user-id"`
	OrgID        string   `json:"x-hasura-org-id"`
	Custom       string   `json:"x-hasura-custom"`
}

Jump to

Keyboard shortcuts

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