oidc

package
v0.0.1-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidateJwtFunc = validateJwt

Functions

func ConfigHeaderNameDecodedJwt

func ConfigHeaderNameDecodedJwt() string

func ConfigJwksUrl

func ConfigJwksUrl() string

func GetAuthHeader

func GetAuthHeader(r *http.Request) string

func NewService

func NewService() authz.Service

Types

type AccountGetterOidc

type AccountGetterOidc struct{}

func (*AccountGetterOidc) GetAccount

func (s *AccountGetterOidc) GetAccount(r *http.Request) (string, error)

GetRole retrieves the user role from jwt

type HasuraSaasClaims

type HasuraSaasClaims struct {
	HasuraSaasRole    string `json:"role,omitempty"`
	HasuraSaasAccount string `json:"account,omitempty"`
}

type JwtTokenWithClaims

type JwtTokenWithClaims struct {
	*jwt.StandardClaims
	HasuraSaasNamespace HasuraSaasClaims `json:"hasura_saas_claims,omitempty"`
}

type RoleGetterOidc

type RoleGetterOidc struct{}

func (*RoleGetterOidc) GetRole

func (s *RoleGetterOidc) GetRole(r *http.Request) (string, error)

GetRole retrieves the user role from jwt

type UserGetterOidc

type UserGetterOidc struct{}

func (*UserGetterOidc) GetUser

func (s *UserGetterOidc) GetUser(r *http.Request) (string, error)

GetUser Validates and JWT token and returns the decoded information of the token

Jump to

Keyboard shortcuts

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