oidc

package
v0.0.0-...-a3cb586 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorPageData

type ErrorPageData struct {
	ErrorMessage string
}

type GoogleLogin

type GoogleLogin struct {
	ClientID     string `yaml:"client_id"`
	ClientSecret string `yaml:"client_secret"`
	RedirectURI  string `yaml:"redirect_uri"`
}

type LoginPageData

type LoginPageData struct {
	Title              string
	AllowPasswordLogin bool
	AllowGoogleLogin   bool
	State              string
	GoogleLoginURL     string
}

LoginPageData holds the data to be passed to the login page template.

type OIDCProviderConfig

type OIDCProviderConfig struct {
	// Title of the OIDC Provider.
	Title string `yaml:"title"`

	// PrivateKeyPEM is RSA 256 private key in PEM format
	PrivateKeyPEM string `yaml:"private_key_pem"`

	// Issuer is the url of this OIDC Provider.
	Issuer string `yaml:"issuer"`

	SSO SSOConfig `yaml:"sso"`
}

func (*OIDCProviderConfig) Validate

func (c *OIDCProviderConfig) Validate()

type OpenIDProvider

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

func NewOpenIDProvider

func NewOpenIDProvider(config *OIDCProviderConfig, db *gormw.DB) *OpenIDProvider

func (*OpenIDProvider) RegisterHandlers

func (o *OpenIDProvider) RegisterHandlers(rg *gin.RouterGroup)

func (*OpenIDProvider) RenderLoginPage

func (o *OpenIDProvider) RenderLoginPage(w http.ResponseWriter, data *LoginPageData) error

RenderLoginPage renders the login page with the provided state value.

type RegisterPageData

type RegisterPageData struct {
	Title       string
	State       string
	ClientID    string
	RedirectURI string
	Scope       string
}

RegisterPageData holds the data to be passed to the register page template.

type SSOConfig

type SSOConfig struct {
	Google GoogleLogin `yaml:"google"`
}

Jump to

Keyboard shortcuts

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