hydra

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 11 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"`
	Owner                   string          `json:"owner"`
	TokenEndpointAuthMethod string          `json:"token_endpoint_auth_method,omitempty"`
	Metadata                json.RawMessage `json:"metadata,omitempty"`
}

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