auth

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package auth provides a simple wrapper around values needed for the openidconnect package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OIDCProviderConfig

type OIDCProviderConfig struct {
	OIDCClientKey    string
	OIDCClientSecret string
	OIDCCallbackURL  string
	OIDCDiscoveryURL string
	OIDCProviderName string
	OIDCScopes       []string
}

OIDCProviderConfig is used to configure the openidconnect object from the openidconnect package github.com/markbates/goth/providers/openidConnect

type OIDCUserInfo

type OIDCUserInfo struct {
	Name  string `json:"name"`
	Email string `json:"email"`
	Sub   string `json:"sub"`
}

OIDCUserInfo provides basic user info from OIDC

func UserInfoFromJWT

func UserInfoFromJWT(ctx context.Context, rawToken string, oidcConfigs []ginjwt.AuthConfig) (*OIDCUserInfo, error)

UserInfoFromJWT tries to retrieve the user info (id token claims) using the given jwt token. It will use the oidc provider matching the issuer in the access token

Jump to

Keyboard shortcuts

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