hydra

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetOAuth2Client(id string) (*OAuth2ClientJSON, bool, error)
	ListOAuth2Client() ([]*OAuth2ClientJSON, error)
	PostOAuth2Client(o *OAuth2ClientJSON) (*OAuth2ClientJSON, error)
	PutOAuth2Client(o *OAuth2ClientJSON) (*OAuth2ClientJSON, error)
	DeleteOAuth2Client(id string) error
}

func New added in v0.0.24

func New(spec hydrav1alpha1.OAuth2ClientSpec, tlsTrustStore string, insecureSkipVerify bool) (Client, error)

New returns a new hydra InternalClient instance.

type InternalClient added in v0.0.24

type InternalClient struct {
	HydraURL       url.URL
	HTTPClient     *http.Client
	ForwardedProto string
}

func (*InternalClient) DeleteOAuth2Client added in v0.0.24

func (c *InternalClient) DeleteOAuth2Client(id string) error

func (*InternalClient) GetOAuth2Client added in v0.0.24

func (c *InternalClient) GetOAuth2Client(id string) (*OAuth2ClientJSON, bool, error)

func (*InternalClient) ListOAuth2Client added in v0.0.24

func (c *InternalClient) ListOAuth2Client() ([]*OAuth2ClientJSON, error)

func (*InternalClient) PostOAuth2Client added in v0.0.24

func (c *InternalClient) PostOAuth2Client(o *OAuth2ClientJSON) (*OAuth2ClientJSON, error)

func (*InternalClient) PutOAuth2Client added in v0.0.24

func (c *InternalClient) PutOAuth2Client(o *OAuth2ClientJSON) (*OAuth2ClientJSON, error)

type OAuth2ClientJSON

type OAuth2ClientJSON struct {
	ClientName                        string          `json:"client_name,omitempty"`
	ClientID                          *string         `json:"client_id,omitempty"`
	Secret                            *string         `json:"client_secret,omitempty"`
	GrantTypes                        []string        `json:"grant_types"`
	RedirectURIs                      []string        `json:"redirect_uris,omitempty"`
	PostLogoutRedirectURIs            []string        `json:"post_logout_redirect_uris,omitempty"`
	AllowedCorsOrigins                []string        `json:"allowed_cors_origins,omitempty"`
	ResponseTypes                     []string        `json:"response_types,omitempty"`
	Audience                          []string        `json:"audience,omitempty"`
	Scope                             string          `json:"scope"`
	SkipConsent                       bool            `json:"skip_consent,omitempty"`
	Owner                             string          `json:"owner"`
	TokenEndpointAuthMethod           string          `json:"token_endpoint_auth_method,omitempty"`
	Metadata                          json.RawMessage `json:"metadata,omitempty"`
	JwksUri                           string          `json:"jwks_uri,omitempty"`
	FrontChannelLogoutSessionRequired bool            `json:"frontchannel_logout_session_required"`
	FrontChannelLogoutURI             string          `json:"frontchannel_logout_uri"`
	BackChannelLogoutSessionRequired  bool            `json:"backchannel_logout_session_required"`
	BackChannelLogoutURI              string          `json:"backchannel_logout_uri"`
}

OAuth2ClientJSON represents an OAuth2 client digestible by ORY Hydra

func FromOAuth2Client added in v0.0.24

func FromOAuth2Client(c *hydrav1alpha1.OAuth2Client) (*OAuth2ClientJSON, error)

FromOAuth2Client converts an OAuth2Client into a OAuth2ClientJSON object that represents an OAuth2 InternalClient digestible by ORY Hydra

func (*OAuth2ClientJSON) WithCredentials added in v0.0.4

func (oj *OAuth2ClientJSON) WithCredentials(credentials *Oauth2ClientCredentials) *OAuth2ClientJSON

type Oauth2ClientCredentials added in v0.0.4

type Oauth2ClientCredentials struct {
	ID       []byte
	Password []byte
}

Oauth2ClientCredentials represents client ID and password fetched from a Kubernetes secret

Jump to

Keyboard shortcuts

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