mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 03:19:51 +03:00
ea2bdde5a3
* bump conformance server Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add support for rfc push Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make format and aud optional Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix some endpoints Signed-off-by: Jens Langhammer <jens@goauthentik.io> * force 401 Signed-off-by: Jens Langhammer <jens@goauthentik.io> * implement get and patch for streams Signed-off-by: Jens Langhammer <jens@goauthentik.io> * cleanup Signed-off-by: Jens Langhammer <jens@goauthentik.io> * enable async stream deletion Signed-off-by: Jens Langhammer <jens@goauthentik.io> * allow configuring remote certificate validation Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add verification endpoint Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add support for authorization_header Signed-off-by: Jens Langhammer <jens@goauthentik.io> * set default aud cause spec cant agree with itself Signed-off-by: Jens Langhammer <jens@goauthentik.io> * bump timeout Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix header `typ` Signed-off-by: Jens Langhammer <jens@goauthentik.io> * enabled -> status Signed-off-by: Jens Langhammer <jens@goauthentik.io> * re-migrate Signed-off-by: Jens Langhammer <jens@goauthentik.io> * gen Signed-off-by: Jens Langhammer <jens@goauthentik.io> * more tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * more tests and a fix Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make streams deletable Signed-off-by: Jens Langhammer <jens@goauthentik.io> * and more logs and fix a silly bug Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add stream status endpoint Signed-off-by: Jens Langhammer <jens@goauthentik.io> * move ssf out of preview Signed-off-by: Jens Langhammer <jens@goauthentik.io> * unrelated typing fix Signed-off-by: Jens Langhammer <jens@goauthentik.io> * format Signed-off-by: Jens Langhammer <jens@goauthentik.io> * sigh Signed-off-by: Jens Langhammer <jens@goauthentik.io> * more tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
309 lines
8.4 KiB
Go
Generated
309 lines
8.4 KiB
Go
Generated
/*
|
|
authentik
|
|
|
|
Making authentication simple.
|
|
|
|
API version: 2026.5.0-rc1
|
|
Contact: hello@goauthentik.io
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
)
|
|
|
|
// checks if the SSFProviderRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SSFProviderRequest{}
|
|
|
|
// SSFProviderRequest SSFProvider Serializer
|
|
type SSFProviderRequest struct {
|
|
Name string `json:"name"`
|
|
// Key used to sign the SSF Events.
|
|
SigningKey string `json:"signing_key"`
|
|
OidcAuthProviders []int32 `json:"oidc_auth_providers,omitempty"`
|
|
EventRetention *string `json:"event_retention,omitempty"`
|
|
PushVerifyCertificates *bool `json:"push_verify_certificates,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SSFProviderRequest SSFProviderRequest
|
|
|
|
// NewSSFProviderRequest instantiates a new SSFProviderRequest object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewSSFProviderRequest(name string, signingKey string) *SSFProviderRequest {
|
|
this := SSFProviderRequest{}
|
|
this.Name = name
|
|
this.SigningKey = signingKey
|
|
return &this
|
|
}
|
|
|
|
// NewSSFProviderRequestWithDefaults instantiates a new SSFProviderRequest object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewSSFProviderRequestWithDefaults() *SSFProviderRequest {
|
|
this := SSFProviderRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *SSFProviderRequest) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SSFProviderRequest) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *SSFProviderRequest) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetSigningKey returns the SigningKey field value
|
|
func (o *SSFProviderRequest) GetSigningKey() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.SigningKey
|
|
}
|
|
|
|
// GetSigningKeyOk returns a tuple with the SigningKey field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SSFProviderRequest) GetSigningKeyOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.SigningKey, true
|
|
}
|
|
|
|
// SetSigningKey sets field value
|
|
func (o *SSFProviderRequest) SetSigningKey(v string) {
|
|
o.SigningKey = v
|
|
}
|
|
|
|
// GetOidcAuthProviders returns the OidcAuthProviders field value if set, zero value otherwise.
|
|
func (o *SSFProviderRequest) GetOidcAuthProviders() []int32 {
|
|
if o == nil || IsNil(o.OidcAuthProviders) {
|
|
var ret []int32
|
|
return ret
|
|
}
|
|
return o.OidcAuthProviders
|
|
}
|
|
|
|
// GetOidcAuthProvidersOk returns a tuple with the OidcAuthProviders field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SSFProviderRequest) GetOidcAuthProvidersOk() ([]int32, bool) {
|
|
if o == nil || IsNil(o.OidcAuthProviders) {
|
|
return nil, false
|
|
}
|
|
return o.OidcAuthProviders, true
|
|
}
|
|
|
|
// HasOidcAuthProviders returns a boolean if a field has been set.
|
|
func (o *SSFProviderRequest) HasOidcAuthProviders() bool {
|
|
if o != nil && !IsNil(o.OidcAuthProviders) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOidcAuthProviders gets a reference to the given []int32 and assigns it to the OidcAuthProviders field.
|
|
func (o *SSFProviderRequest) SetOidcAuthProviders(v []int32) {
|
|
o.OidcAuthProviders = v
|
|
}
|
|
|
|
// GetEventRetention returns the EventRetention field value if set, zero value otherwise.
|
|
func (o *SSFProviderRequest) GetEventRetention() string {
|
|
if o == nil || IsNil(o.EventRetention) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.EventRetention
|
|
}
|
|
|
|
// GetEventRetentionOk returns a tuple with the EventRetention field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SSFProviderRequest) GetEventRetentionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.EventRetention) {
|
|
return nil, false
|
|
}
|
|
return o.EventRetention, true
|
|
}
|
|
|
|
// HasEventRetention returns a boolean if a field has been set.
|
|
func (o *SSFProviderRequest) HasEventRetention() bool {
|
|
if o != nil && !IsNil(o.EventRetention) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEventRetention gets a reference to the given string and assigns it to the EventRetention field.
|
|
func (o *SSFProviderRequest) SetEventRetention(v string) {
|
|
o.EventRetention = &v
|
|
}
|
|
|
|
// GetPushVerifyCertificates returns the PushVerifyCertificates field value if set, zero value otherwise.
|
|
func (o *SSFProviderRequest) GetPushVerifyCertificates() bool {
|
|
if o == nil || IsNil(o.PushVerifyCertificates) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.PushVerifyCertificates
|
|
}
|
|
|
|
// GetPushVerifyCertificatesOk returns a tuple with the PushVerifyCertificates field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SSFProviderRequest) GetPushVerifyCertificatesOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.PushVerifyCertificates) {
|
|
return nil, false
|
|
}
|
|
return o.PushVerifyCertificates, true
|
|
}
|
|
|
|
// HasPushVerifyCertificates returns a boolean if a field has been set.
|
|
func (o *SSFProviderRequest) HasPushVerifyCertificates() bool {
|
|
if o != nil && !IsNil(o.PushVerifyCertificates) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPushVerifyCertificates gets a reference to the given bool and assigns it to the PushVerifyCertificates field.
|
|
func (o *SSFProviderRequest) SetPushVerifyCertificates(v bool) {
|
|
o.PushVerifyCertificates = &v
|
|
}
|
|
|
|
func (o SSFProviderRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SSFProviderRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
toSerialize["signing_key"] = o.SigningKey
|
|
if !IsNil(o.OidcAuthProviders) {
|
|
toSerialize["oidc_auth_providers"] = o.OidcAuthProviders
|
|
}
|
|
if !IsNil(o.EventRetention) {
|
|
toSerialize["event_retention"] = o.EventRetention
|
|
}
|
|
if !IsNil(o.PushVerifyCertificates) {
|
|
toSerialize["push_verify_certificates"] = o.PushVerifyCertificates
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SSFProviderRequest) UnmarshalJSON(data []byte) (err error) {
|
|
// This validates that all required properties are included in the JSON object
|
|
// by unmarshalling the object into a generic map with string keys and checking
|
|
// that every required field exists as a key in the generic map.
|
|
requiredProperties := []string{
|
|
"name",
|
|
"signing_key",
|
|
}
|
|
|
|
allProperties := make(map[string]interface{})
|
|
|
|
err = json.Unmarshal(data, &allProperties)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
for _, requiredProperty := range requiredProperties {
|
|
if _, exists := allProperties[requiredProperty]; !exists {
|
|
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
|
}
|
|
}
|
|
|
|
varSSFProviderRequest := _SSFProviderRequest{}
|
|
|
|
err = json.Unmarshal(data, &varSSFProviderRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SSFProviderRequest(varSSFProviderRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "signing_key")
|
|
delete(additionalProperties, "oidc_auth_providers")
|
|
delete(additionalProperties, "event_retention")
|
|
delete(additionalProperties, "push_verify_certificates")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSSFProviderRequest struct {
|
|
value *SSFProviderRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSSFProviderRequest) Get() *SSFProviderRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSSFProviderRequest) Set(val *SSFProviderRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSSFProviderRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSSFProviderRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSSFProviderRequest(val *SSFProviderRequest) *NullableSSFProviderRequest {
|
|
return &NullableSSFProviderRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSSFProviderRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSSFProviderRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|