Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the hydra v1alpha1 API group +kubebuilder:object:generate=true +groupName=hydra.ory.sh
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "hydra.ory.sh", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type GrantType ¶
type GrantType string
+kubebuilder:validation:Enum=client_credentials;authorization_code;implicit;refresh_token GrantType represents an OAuth 2.0 grant type
type HydraAdmin ¶ added in v0.0.5
type HydraAdmin struct {
// +kubebuilder:validation:MaxLength=64
// +kubebuilder:validation:Pattern=`(^$|^https?://.*)`
//
// URL is the URL for the hydra instance on
// which to set up the client. This value will override the value
// provided to `--hydra-url`
URL string `json:"url,omitempty"`
// +kubebuilder:validation:Maximum=65535
//
// Port is the port for the hydra instance on
// which to set up the client. This value will override the value
// provided to `--hydra-port`
Port int `json:"port,omitempty"`
// +kubebuilder:validation:Pattern=(^$|^/.*)
//
// Endpoint is the endpoint for the hydra instance on which
// to set up the client. This value will override the value
// provided to `--endpoint` (defaults to `"/clients"` in the
// application)
Endpoint string `json:"endpoint,omitempty"`
// +kubebuilder:validation:Pattern=(^$|https?|off)
//
// ForwardedProto overrides the `--forwarded-proto` flag. The
// value "off" will force this to be off even if
// `--forwarded-proto` is specified
ForwardedProto string `json:"forwardedProto,omitempty"`
}
HydraAdmin defines the desired hydra admin instance to use for OAuth2Client
func (*HydraAdmin) DeepCopy ¶ added in v0.0.5
func (in *HydraAdmin) DeepCopy() *HydraAdmin
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HydraAdmin.
func (*HydraAdmin) DeepCopyInto ¶ added in v0.0.5
func (in *HydraAdmin) DeepCopyInto(out *HydraAdmin)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OAuth2Client ¶
type OAuth2Client struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec OAuth2ClientSpec `json:"spec,omitempty"`
Status OAuth2ClientStatus `json:"status,omitempty"`
}
OAuth2Client is the Schema for the oauth2clients API
func (*OAuth2Client) DeepCopy ¶
func (in *OAuth2Client) DeepCopy() *OAuth2Client
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2Client.
func (*OAuth2Client) DeepCopyInto ¶
func (in *OAuth2Client) DeepCopyInto(out *OAuth2Client)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OAuth2Client) DeepCopyObject ¶
func (in *OAuth2Client) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*OAuth2Client) ToOAuth2ClientJSON ¶
func (c *OAuth2Client) ToOAuth2ClientJSON() (*hydra.OAuth2ClientJSON, error)
ToOAuth2ClientJSON converts an OAuth2Client into a OAuth2ClientJSON object that represents an OAuth2 client digestible by ORY Hydra
type OAuth2ClientList ¶
type OAuth2ClientList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []OAuth2Client `json:"items"`
}
OAuth2ClientList contains a list of OAuth2Client
func (*OAuth2ClientList) DeepCopy ¶
func (in *OAuth2ClientList) DeepCopy() *OAuth2ClientList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2ClientList.
func (*OAuth2ClientList) DeepCopyInto ¶
func (in *OAuth2ClientList) DeepCopyInto(out *OAuth2ClientList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OAuth2ClientList) DeepCopyObject ¶
func (in *OAuth2ClientList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OAuth2ClientSpec ¶
type OAuth2ClientSpec struct {
// ClientName is the human-readable string name of the client to be presented to the end-user during authorization.
ClientName string `json:"clientName,omitempty"`
// +kubebuilder:validation:MaxItems=4
// +kubebuilder:validation:MinItems=1
//
// GrantTypes is an array of grant types the client is allowed to use.
GrantTypes []GrantType `json:"grantTypes"`
// +kubebuilder:validation:MaxItems=3
// +kubebuilder:validation:MinItems=1
//
// ResponseTypes is an array of the OAuth 2.0 response type strings that the client can
// use at the authorization endpoint.
ResponseTypes []ResponseType `json:"responseTypes,omitempty"`
// RedirectURIs is an array of the redirect URIs allowed for the application
RedirectURIs []RedirectURI `json:"redirectUris,omitempty"`
// PostLogoutRedirectURIs is an array of the post logout redirect URIs allowed for the application
PostLogoutRedirectURIs []RedirectURI `json:"postLogoutRedirectUris,omitempty"`
// AllowedCorsOrigins is an array of allowed CORS origins
AllowedCorsOrigins []RedirectURI `json:"allowedCorsOrigins,omitempty"`
// Audience is a whitelist defining the audiences this client is allowed to request tokens for
Audience []string `json:"audience,omitempty"`
// +kubebuilder:validation:Pattern=([a-zA-Z0-9\.\*]+\s?)+
//
// Scope is a string containing a space-separated list of scope values (as
// described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client
// can use when requesting access tokens.
Scope string `json:"scope"`
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
//
// SecretName points to the K8s secret that contains this client's ID and password
SecretName string `json:"secretName"`
// HydraAdmin is the optional configuration to use for managing
// this client
HydraAdmin HydraAdmin `json:"hydraAdmin,omitempty"`
// +kubebuilder:validation:Enum=client_secret_basic;client_secret_post;private_key_jwt;none
//
// Indication which authentication method shoud be used for the token endpoint
TokenEndpointAuthMethod TokenEndpointAuthMethod `json:"tokenEndpointAuthMethod,omitempty"`
// +kubebuilder:validation:Type=object
// +nullable
// +optional
//
// Metadata is abritrary data
Metadata apiextensionsv1.JSON `json:"metadata,omitempty"`
}
OAuth2ClientSpec defines the desired state of OAuth2Client
func (*OAuth2ClientSpec) DeepCopy ¶
func (in *OAuth2ClientSpec) DeepCopy() *OAuth2ClientSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2ClientSpec.
func (*OAuth2ClientSpec) DeepCopyInto ¶
func (in *OAuth2ClientSpec) DeepCopyInto(out *OAuth2ClientSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OAuth2ClientStatus ¶
type OAuth2ClientStatus struct {
// ObservedGeneration represents the most recent generation observed by the daemon set controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
ReconciliationError ReconciliationError `json:"reconciliationError,omitempty"`
}
OAuth2ClientStatus defines the observed state of OAuth2Client
func (*OAuth2ClientStatus) DeepCopy ¶
func (in *OAuth2ClientStatus) DeepCopy() *OAuth2ClientStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2ClientStatus.
func (*OAuth2ClientStatus) DeepCopyInto ¶
func (in *OAuth2ClientStatus) DeepCopyInto(out *OAuth2ClientStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReconciliationError ¶ added in v0.0.4
type ReconciliationError struct {
// Code is the status code of the reconciliation error
Code StatusCode `json:"statusCode,omitempty"`
// Description is the description of the reconciliation error
Description string `json:"description,omitempty"`
}
ReconciliationError represents an error that occurred during the reconciliation process
func (*ReconciliationError) DeepCopy ¶ added in v0.0.4
func (in *ReconciliationError) DeepCopy() *ReconciliationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReconciliationError.
func (*ReconciliationError) DeepCopyInto ¶ added in v0.0.4
func (in *ReconciliationError) DeepCopyInto(out *ReconciliationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedirectURI ¶ added in v0.0.5
type RedirectURI string
+kubebuilder:validation:Pattern=`\w+:/?/?[^\s]+` RedirectURI represents a redirect URI for the client
type ResponseType ¶
type ResponseType string
+kubebuilder:validation:Enum=id_token;code;token ResponseType represents an OAuth 2.0 response type strings
type StatusCode ¶ added in v0.0.4
type StatusCode string
const ( StatusRegistrationFailed StatusCode = "CLIENT_REGISTRATION_FAILED" StatusCreateSecretFailed StatusCode = "SECRET_CREATION_FAILED" StatusUpdateFailed StatusCode = "CLIENT_UPDATE_FAILED" StatusInvalidSecret StatusCode = "INVALID_SECRET" StatusInvalidHydraAddress StatusCode = "INVALID_HYDRA_ADDRESS" )
type TokenEndpointAuthMethod ¶ added in v0.0.6
type TokenEndpointAuthMethod string
+kubebuilder:validation:Enum=client_secret_basic;client_secret_post;private_key_jwt;none TokenEndpointAuthMethod represents an authentication method for token endpoint