Documentation ¶
Index ¶
- Constants
- Variables
- func AuthenticateToProvider(provider OIDCProvider) error
- func AzureCommand(cmd *cobra.Command, args []string) error
- func DefaultCommand(cmd *cobra.Command, args []string) error
- func Execute() error
- func ExtractAuthInfo(kubeConfig string) (*clientCmdApi.AuthInfo, error)
- func GoogleCommand(cmd *cobra.Command, args []string) error
- type AzureOIDC
- type CustomClaim
- type DexterOIDC
- type GoogleOIDC
- type OIDCProvider
Constants ¶
View Source
const (
BANNER = `` /* 252-byte string literal not displayed */
)
Variables ¶
View Source
var ( // Cobra command AuthCmd = &cobra.Command{ Use: "auth", Short: "Authenticate with OIDC provider", Long: `Use a provider sub-command to authenticate against your identity provider of choice. For details go to: https://blog.gini.net/ `, RunE: DefaultCommand, } )
Functions ¶
func AuthenticateToProvider ¶ added in v0.4.0
func AuthenticateToProvider(provider OIDCProvider) error
initiate the OIDC flow. This func should be called in each cobra command
func DefaultCommand ¶ added in v0.4.1
support build time providers. If the variable buildTimeProvider is set run the provider. FR: https://github.com/gini/dexter/issues/29
func ExtractAuthInfo ¶ added in v0.4.0
func ExtractAuthInfo(kubeConfig string) (*clientCmdApi.AuthInfo, error)
extract relevant authentication data from the given kube config
Types ¶
type AzureOIDC ¶ added in v0.4.0
type AzureOIDC struct { DexterOIDC // embed the base provider // contains filtered or unexported fields }
type CustomClaim ¶ added in v0.3.0
type CustomClaim struct {
Email string `json:"email"`
}
helper type to render the k8s config
type DexterOIDC ¶ added in v0.4.0
type DexterOIDC struct { Oauth2Config *oauth2.Config // oauth2 configuration // contains filtered or unexported fields }
DexterOIDC: struct to store the required data and provide methods to authenticate with OpenID providers
func (*DexterOIDC) AuthInfoToOauth2 ¶ added in v0.4.0
func (d *DexterOIDC) AuthInfoToOauth2(authInfo *clientCmdApi.AuthInfo)
create Oauth2 configuration
func (*DexterOIDC) Autopilot ¶ added in v0.4.0
func (d *DexterOIDC) Autopilot() error
func (*DexterOIDC) ConfigureOAuth2Manully ¶ added in v0.4.0
func (d *DexterOIDC) ConfigureOAuth2Manully() error
attempt to set client credentials
func (DexterOIDC) GenerateAuthUrl ¶ added in v0.4.0
func (d DexterOIDC) GenerateAuthUrl() string
func (DexterOIDC) PreflightCheck ¶ added in v0.4.0
func (d DexterOIDC) PreflightCheck() error
ensure that the required parameters are defined and that the values make sense
func (DexterOIDC) StartHTTPServer ¶ added in v0.4.0
func (d DexterOIDC) StartHTTPServer() error
start HTTP server to receive callbacks. This has to be run in a go routine
type GoogleOIDC ¶ added in v0.4.0
type GoogleOIDC struct {
DexterOIDC
}
Click to show internal directories.
Click to hide internal directories.