mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 03:19:51 +03:00
2f70351c90
* packages/client-go: init Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * format Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove mod/sum Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix translate Signed-off-by: Jens Langhammer <jens@goauthentik.io> * no go replace Signed-off-by: Jens Langhammer <jens@goauthentik.io> * update rust makefile with pwd Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * fix build Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix docs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * don't need a version ig? Signed-off-by: Jens Langhammer <jens@goauthentik.io> * exclude go client from cspell Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix main docker build Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
476 lines
14 KiB
Go
Generated
476 lines
14 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 RadiusProviderRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RadiusProviderRequest{}
|
|
|
|
// RadiusProviderRequest RadiusProvider Serializer
|
|
type RadiusProviderRequest struct {
|
|
Name string `json:"name"`
|
|
// Flow used for authentication when the associated application is accessed by an un-authenticated user.
|
|
AuthenticationFlow NullableString `json:"authentication_flow,omitempty"`
|
|
// Flow used when authorizing this provider.
|
|
AuthorizationFlow string `json:"authorization_flow"`
|
|
// Flow used ending the session from a provider.
|
|
InvalidationFlow string `json:"invalidation_flow"`
|
|
PropertyMappings []string `json:"property_mappings,omitempty"`
|
|
// List of CIDRs (comma-separated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped.
|
|
ClientNetworks *string `json:"client_networks,omitempty"`
|
|
// Shared secret between clients and server to hash packets.
|
|
SharedSecret *string `json:"shared_secret,omitempty"`
|
|
// When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon.
|
|
MfaSupport *bool `json:"mfa_support,omitempty"`
|
|
Certificate NullableString `json:"certificate,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RadiusProviderRequest RadiusProviderRequest
|
|
|
|
// NewRadiusProviderRequest instantiates a new RadiusProviderRequest 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 NewRadiusProviderRequest(name string, authorizationFlow string, invalidationFlow string) *RadiusProviderRequest {
|
|
this := RadiusProviderRequest{}
|
|
this.Name = name
|
|
this.AuthorizationFlow = authorizationFlow
|
|
this.InvalidationFlow = invalidationFlow
|
|
return &this
|
|
}
|
|
|
|
// NewRadiusProviderRequestWithDefaults instantiates a new RadiusProviderRequest 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 NewRadiusProviderRequestWithDefaults() *RadiusProviderRequest {
|
|
this := RadiusProviderRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *RadiusProviderRequest) 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 *RadiusProviderRequest) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *RadiusProviderRequest) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *RadiusProviderRequest) GetAuthenticationFlow() string {
|
|
if o == nil || IsNil(o.AuthenticationFlow.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AuthenticationFlow.Get()
|
|
}
|
|
|
|
// GetAuthenticationFlowOk returns a tuple with the AuthenticationFlow field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *RadiusProviderRequest) GetAuthenticationFlowOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.AuthenticationFlow.Get(), o.AuthenticationFlow.IsSet()
|
|
}
|
|
|
|
// HasAuthenticationFlow returns a boolean if a field has been set.
|
|
func (o *RadiusProviderRequest) HasAuthenticationFlow() bool {
|
|
if o != nil && o.AuthenticationFlow.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAuthenticationFlow gets a reference to the given NullableString and assigns it to the AuthenticationFlow field.
|
|
func (o *RadiusProviderRequest) SetAuthenticationFlow(v string) {
|
|
o.AuthenticationFlow.Set(&v)
|
|
}
|
|
|
|
// SetAuthenticationFlowNil sets the value for AuthenticationFlow to be an explicit nil
|
|
func (o *RadiusProviderRequest) SetAuthenticationFlowNil() {
|
|
o.AuthenticationFlow.Set(nil)
|
|
}
|
|
|
|
// UnsetAuthenticationFlow ensures that no value is present for AuthenticationFlow, not even an explicit nil
|
|
func (o *RadiusProviderRequest) UnsetAuthenticationFlow() {
|
|
o.AuthenticationFlow.Unset()
|
|
}
|
|
|
|
// GetAuthorizationFlow returns the AuthorizationFlow field value
|
|
func (o *RadiusProviderRequest) GetAuthorizationFlow() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.AuthorizationFlow
|
|
}
|
|
|
|
// GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RadiusProviderRequest) GetAuthorizationFlowOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.AuthorizationFlow, true
|
|
}
|
|
|
|
// SetAuthorizationFlow sets field value
|
|
func (o *RadiusProviderRequest) SetAuthorizationFlow(v string) {
|
|
o.AuthorizationFlow = v
|
|
}
|
|
|
|
// GetInvalidationFlow returns the InvalidationFlow field value
|
|
func (o *RadiusProviderRequest) GetInvalidationFlow() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.InvalidationFlow
|
|
}
|
|
|
|
// GetInvalidationFlowOk returns a tuple with the InvalidationFlow field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RadiusProviderRequest) GetInvalidationFlowOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.InvalidationFlow, true
|
|
}
|
|
|
|
// SetInvalidationFlow sets field value
|
|
func (o *RadiusProviderRequest) SetInvalidationFlow(v string) {
|
|
o.InvalidationFlow = v
|
|
}
|
|
|
|
// GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise.
|
|
func (o *RadiusProviderRequest) GetPropertyMappings() []string {
|
|
if o == nil || IsNil(o.PropertyMappings) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.PropertyMappings
|
|
}
|
|
|
|
// GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RadiusProviderRequest) GetPropertyMappingsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.PropertyMappings) {
|
|
return nil, false
|
|
}
|
|
return o.PropertyMappings, true
|
|
}
|
|
|
|
// HasPropertyMappings returns a boolean if a field has been set.
|
|
func (o *RadiusProviderRequest) HasPropertyMappings() bool {
|
|
if o != nil && !IsNil(o.PropertyMappings) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPropertyMappings gets a reference to the given []string and assigns it to the PropertyMappings field.
|
|
func (o *RadiusProviderRequest) SetPropertyMappings(v []string) {
|
|
o.PropertyMappings = v
|
|
}
|
|
|
|
// GetClientNetworks returns the ClientNetworks field value if set, zero value otherwise.
|
|
func (o *RadiusProviderRequest) GetClientNetworks() string {
|
|
if o == nil || IsNil(o.ClientNetworks) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ClientNetworks
|
|
}
|
|
|
|
// GetClientNetworksOk returns a tuple with the ClientNetworks field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RadiusProviderRequest) GetClientNetworksOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ClientNetworks) {
|
|
return nil, false
|
|
}
|
|
return o.ClientNetworks, true
|
|
}
|
|
|
|
// HasClientNetworks returns a boolean if a field has been set.
|
|
func (o *RadiusProviderRequest) HasClientNetworks() bool {
|
|
if o != nil && !IsNil(o.ClientNetworks) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetClientNetworks gets a reference to the given string and assigns it to the ClientNetworks field.
|
|
func (o *RadiusProviderRequest) SetClientNetworks(v string) {
|
|
o.ClientNetworks = &v
|
|
}
|
|
|
|
// GetSharedSecret returns the SharedSecret field value if set, zero value otherwise.
|
|
func (o *RadiusProviderRequest) GetSharedSecret() string {
|
|
if o == nil || IsNil(o.SharedSecret) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SharedSecret
|
|
}
|
|
|
|
// GetSharedSecretOk returns a tuple with the SharedSecret field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RadiusProviderRequest) GetSharedSecretOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SharedSecret) {
|
|
return nil, false
|
|
}
|
|
return o.SharedSecret, true
|
|
}
|
|
|
|
// HasSharedSecret returns a boolean if a field has been set.
|
|
func (o *RadiusProviderRequest) HasSharedSecret() bool {
|
|
if o != nil && !IsNil(o.SharedSecret) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSharedSecret gets a reference to the given string and assigns it to the SharedSecret field.
|
|
func (o *RadiusProviderRequest) SetSharedSecret(v string) {
|
|
o.SharedSecret = &v
|
|
}
|
|
|
|
// GetMfaSupport returns the MfaSupport field value if set, zero value otherwise.
|
|
func (o *RadiusProviderRequest) GetMfaSupport() bool {
|
|
if o == nil || IsNil(o.MfaSupport) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.MfaSupport
|
|
}
|
|
|
|
// GetMfaSupportOk returns a tuple with the MfaSupport field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RadiusProviderRequest) GetMfaSupportOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.MfaSupport) {
|
|
return nil, false
|
|
}
|
|
return o.MfaSupport, true
|
|
}
|
|
|
|
// HasMfaSupport returns a boolean if a field has been set.
|
|
func (o *RadiusProviderRequest) HasMfaSupport() bool {
|
|
if o != nil && !IsNil(o.MfaSupport) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMfaSupport gets a reference to the given bool and assigns it to the MfaSupport field.
|
|
func (o *RadiusProviderRequest) SetMfaSupport(v bool) {
|
|
o.MfaSupport = &v
|
|
}
|
|
|
|
// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *RadiusProviderRequest) GetCertificate() string {
|
|
if o == nil || IsNil(o.Certificate.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Certificate.Get()
|
|
}
|
|
|
|
// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *RadiusProviderRequest) GetCertificateOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.Certificate.Get(), o.Certificate.IsSet()
|
|
}
|
|
|
|
// HasCertificate returns a boolean if a field has been set.
|
|
func (o *RadiusProviderRequest) HasCertificate() bool {
|
|
if o != nil && o.Certificate.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCertificate gets a reference to the given NullableString and assigns it to the Certificate field.
|
|
func (o *RadiusProviderRequest) SetCertificate(v string) {
|
|
o.Certificate.Set(&v)
|
|
}
|
|
|
|
// SetCertificateNil sets the value for Certificate to be an explicit nil
|
|
func (o *RadiusProviderRequest) SetCertificateNil() {
|
|
o.Certificate.Set(nil)
|
|
}
|
|
|
|
// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil
|
|
func (o *RadiusProviderRequest) UnsetCertificate() {
|
|
o.Certificate.Unset()
|
|
}
|
|
|
|
func (o RadiusProviderRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RadiusProviderRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
if o.AuthenticationFlow.IsSet() {
|
|
toSerialize["authentication_flow"] = o.AuthenticationFlow.Get()
|
|
}
|
|
toSerialize["authorization_flow"] = o.AuthorizationFlow
|
|
toSerialize["invalidation_flow"] = o.InvalidationFlow
|
|
if !IsNil(o.PropertyMappings) {
|
|
toSerialize["property_mappings"] = o.PropertyMappings
|
|
}
|
|
if !IsNil(o.ClientNetworks) {
|
|
toSerialize["client_networks"] = o.ClientNetworks
|
|
}
|
|
if !IsNil(o.SharedSecret) {
|
|
toSerialize["shared_secret"] = o.SharedSecret
|
|
}
|
|
if !IsNil(o.MfaSupport) {
|
|
toSerialize["mfa_support"] = o.MfaSupport
|
|
}
|
|
if o.Certificate.IsSet() {
|
|
toSerialize["certificate"] = o.Certificate.Get()
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RadiusProviderRequest) 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",
|
|
"authorization_flow",
|
|
"invalidation_flow",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varRadiusProviderRequest := _RadiusProviderRequest{}
|
|
|
|
err = json.Unmarshal(data, &varRadiusProviderRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RadiusProviderRequest(varRadiusProviderRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "authentication_flow")
|
|
delete(additionalProperties, "authorization_flow")
|
|
delete(additionalProperties, "invalidation_flow")
|
|
delete(additionalProperties, "property_mappings")
|
|
delete(additionalProperties, "client_networks")
|
|
delete(additionalProperties, "shared_secret")
|
|
delete(additionalProperties, "mfa_support")
|
|
delete(additionalProperties, "certificate")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRadiusProviderRequest struct {
|
|
value *RadiusProviderRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRadiusProviderRequest) Get() *RadiusProviderRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRadiusProviderRequest) Set(val *RadiusProviderRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRadiusProviderRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRadiusProviderRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRadiusProviderRequest(val *RadiusProviderRequest) *NullableRadiusProviderRequest {
|
|
return &NullableRadiusProviderRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRadiusProviderRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRadiusProviderRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|