diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 80cffbe..271307c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -137,6 +137,7 @@ docs/FlowStageBindingRequest.md docs/FlowsApi.md docs/FooterLink.md docs/GenericError.md +docs/GeoipBindingEnum.md docs/Group.md docs/GroupMember.md docs/GroupMemberRequest.md @@ -178,6 +179,7 @@ docs/Metadata.md docs/ModelEnum.md docs/ModelRequest.md docs/NameIdPolicyEnum.md +docs/NetworkBindingEnum.md docs/NotConfiguredActionEnum.md docs/Notification.md docs/NotificationRequest.md @@ -696,6 +698,7 @@ src/main/kotlin/io/goauthentik/api/models/FlowStageBinding.kt src/main/kotlin/io/goauthentik/api/models/FlowStageBindingRequest.kt src/main/kotlin/io/goauthentik/api/models/FooterLink.kt src/main/kotlin/io/goauthentik/api/models/GenericError.kt +src/main/kotlin/io/goauthentik/api/models/GeoipBindingEnum.kt src/main/kotlin/io/goauthentik/api/models/Group.kt src/main/kotlin/io/goauthentik/api/models/GroupMember.kt src/main/kotlin/io/goauthentik/api/models/GroupMemberRequest.kt @@ -736,6 +739,7 @@ src/main/kotlin/io/goauthentik/api/models/Metadata.kt src/main/kotlin/io/goauthentik/api/models/ModelEnum.kt src/main/kotlin/io/goauthentik/api/models/ModelRequest.kt src/main/kotlin/io/goauthentik/api/models/NameIdPolicyEnum.kt +src/main/kotlin/io/goauthentik/api/models/NetworkBindingEnum.kt src/main/kotlin/io/goauthentik/api/models/NotConfiguredActionEnum.kt src/main/kotlin/io/goauthentik/api/models/Notification.kt src/main/kotlin/io/goauthentik/api/models/NotificationRequest.kt diff --git a/README.md b/README.md index fe227e9..ce51f88 100644 --- a/README.md +++ b/README.md @@ -825,6 +825,7 @@ Class | Method | HTTP request | Description - [FlowStageBindingRequest](docs/FlowStageBindingRequest.md) - [FooterLink](docs/FooterLink.md) - [GenericError](docs/GenericError.md) + - [GeoipBindingEnum](docs/GeoipBindingEnum.md) - [Group](docs/Group.md) - [GroupMember](docs/GroupMember.md) - [GroupMemberRequest](docs/GroupMemberRequest.md) @@ -865,6 +866,7 @@ Class | Method | HTTP request | Description - [ModelEnum](docs/ModelEnum.md) - [ModelRequest](docs/ModelRequest.md) - [NameIdPolicyEnum](docs/NameIdPolicyEnum.md) + - [NetworkBindingEnum](docs/NetworkBindingEnum.md) - [NotConfiguredActionEnum](docs/NotConfiguredActionEnum.md) - [Notification](docs/Notification.md) - [NotificationRequest](docs/NotificationRequest.md) diff --git a/docs/GeoipBindingEnum.md b/docs/GeoipBindingEnum.md new file mode 100644 index 0000000..192f6e0 --- /dev/null +++ b/docs/GeoipBindingEnum.md @@ -0,0 +1,18 @@ + +# GeoipBindingEnum + +## Enum + + + * `noBinding` (value: `"no_binding"`) + + * `bindContinent` (value: `"bind_continent"`) + + * `bindContinentCountry` (value: `"bind_continent_country"`) + + * `bindContinentCountryCity` (value: `"bind_continent_country_city"`) + + * `unknownDefaultOpenApi` (value: `"unknown_default_open_api"`) + + + diff --git a/docs/NetworkBindingEnum.md b/docs/NetworkBindingEnum.md new file mode 100644 index 0000000..74c716a --- /dev/null +++ b/docs/NetworkBindingEnum.md @@ -0,0 +1,18 @@ + +# NetworkBindingEnum + +## Enum + + + * `noBinding` (value: `"no_binding"`) + + * `bindAsn` (value: `"bind_asn"`) + + * `bindAsnNetwork` (value: `"bind_asn_network"`) + + * `bindAsnNetworkIp` (value: `"bind_asn_network_ip"`) + + * `unknownDefaultOpenApi` (value: `"unknown_default_open_api"`) + + + diff --git a/docs/PatchedUserLoginStageRequest.md b/docs/PatchedUserLoginStageRequest.md index f44116a..bbd042d 100644 --- a/docs/PatchedUserLoginStageRequest.md +++ b/docs/PatchedUserLoginStageRequest.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **sessionDuration** | **kotlin.String** | Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] **terminateOtherSessions** | **kotlin.Boolean** | Terminate all other sessions of the user logging in. | [optional] **rememberMeOffset** | **kotlin.String** | Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] +**networkBinding** | [**NetworkBindingEnum**](NetworkBindingEnum.md) | | [optional] +**geoipBinding** | [**GeoipBindingEnum**](GeoipBindingEnum.md) | | [optional] diff --git a/docs/ProviderTypeEnum.md b/docs/ProviderTypeEnum.md index 3a16f07..2529cd8 100644 --- a/docs/ProviderTypeEnum.md +++ b/docs/ProviderTypeEnum.md @@ -6,6 +6,8 @@ * `apple` (value: `"apple"`) + * `openidconnect` (value: `"openidconnect"`) + * `azuread` (value: `"azuread"`) * `discord` (value: `"discord"`) @@ -18,8 +20,6 @@ * `mailcow` (value: `"mailcow"`) - * `openidconnect` (value: `"openidconnect"`) - * `okta` (value: `"okta"`) * `patreon` (value: `"patreon"`) diff --git a/docs/StagesApi.md b/docs/StagesApi.md index c3b0a61..e7ff1fa 100644 --- a/docs/StagesApi.md +++ b/docs/StagesApi.md @@ -7457,7 +7457,7 @@ Configure authentik: # **stagesUserLoginList** -> PaginatedUserLoginStageList stagesUserLoginList(name, ordering, page, pageSize, rememberMeOffset, search, sessionDuration, stageUuid, terminateOtherSessions) +> PaginatedUserLoginStageList stagesUserLoginList(geoipBinding, name, networkBinding, ordering, page, pageSize, rememberMeOffset, search, sessionDuration, stageUuid, terminateOtherSessions) @@ -7470,7 +7470,9 @@ UserLoginStage Viewset //import io.goauthentik.api.models.* val apiInstance = StagesApi() +val geoipBinding : kotlin.String = geoipBinding_example // kotlin.String | Bind sessions created by this stage to the configured GeoIP location * `no_binding` - No Binding * `bind_continent` - Bind Continent * `bind_continent_country` - Bind Continent Country * `bind_continent_country_city` - Bind Continent Country City val name : kotlin.String = name_example // kotlin.String | +val networkBinding : kotlin.String = networkBinding_example // kotlin.String | Bind sessions created by this stage to the configured network * `no_binding` - No Binding * `bind_asn` - Bind Asn * `bind_asn_network` - Bind Asn Network * `bind_asn_network_ip` - Bind Asn Network Ip val ordering : kotlin.String = ordering_example // kotlin.String | Which field to use when ordering the results. val page : kotlin.Int = 56 // kotlin.Int | A page number within the paginated result set. val pageSize : kotlin.Int = 56 // kotlin.Int | Number of results to return per page. @@ -7480,7 +7482,7 @@ val sessionDuration : kotlin.String = sessionDuration_example // kotlin.String | val stageUuid : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | val terminateOtherSessions : kotlin.Boolean = true // kotlin.Boolean | try { - val result : PaginatedUserLoginStageList = apiInstance.stagesUserLoginList(name, ordering, page, pageSize, rememberMeOffset, search, sessionDuration, stageUuid, terminateOtherSessions) + val result : PaginatedUserLoginStageList = apiInstance.stagesUserLoginList(geoipBinding, name, networkBinding, ordering, page, pageSize, rememberMeOffset, search, sessionDuration, stageUuid, terminateOtherSessions) println(result) } catch (e: ClientException) { println("4xx response calling StagesApi#stagesUserLoginList") @@ -7495,7 +7497,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **geoipBinding** | **kotlin.String**| Bind sessions created by this stage to the configured GeoIP location * `no_binding` - No Binding * `bind_continent` - Bind Continent * `bind_continent_country` - Bind Continent Country * `bind_continent_country_city` - Bind Continent Country City | [optional] [enum: bind_continent, bind_continent_country, bind_continent_country_city, no_binding] **name** | **kotlin.String**| | [optional] + **networkBinding** | **kotlin.String**| Bind sessions created by this stage to the configured network * `no_binding` - No Binding * `bind_asn` - Bind Asn * `bind_asn_network` - Bind Asn Network * `bind_asn_network_ip` - Bind Asn Network Ip | [optional] [enum: bind_asn, bind_asn_network, bind_asn_network_ip, no_binding] **ordering** | **kotlin.String**| Which field to use when ordering the results. | [optional] **page** | **kotlin.Int**| A page number within the paginated result set. | [optional] **pageSize** | **kotlin.Int**| Number of results to return per page. | [optional] diff --git a/docs/UserLoginStage.md b/docs/UserLoginStage.md index 95b2879..7aee504 100644 --- a/docs/UserLoginStage.md +++ b/docs/UserLoginStage.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **sessionDuration** | **kotlin.String** | Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] **terminateOtherSessions** | **kotlin.Boolean** | Terminate all other sessions of the user logging in. | [optional] **rememberMeOffset** | **kotlin.String** | Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] +**networkBinding** | [**NetworkBindingEnum**](NetworkBindingEnum.md) | | [optional] +**geoipBinding** | [**GeoipBindingEnum**](GeoipBindingEnum.md) | | [optional] diff --git a/docs/UserLoginStageRequest.md b/docs/UserLoginStageRequest.md index c94cae8..3b6dda1 100644 --- a/docs/UserLoginStageRequest.md +++ b/docs/UserLoginStageRequest.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **sessionDuration** | **kotlin.String** | Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] **terminateOtherSessions** | **kotlin.Boolean** | Terminate all other sessions of the user logging in. | [optional] **rememberMeOffset** | **kotlin.String** | Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) | [optional] +**networkBinding** | [**NetworkBindingEnum**](NetworkBindingEnum.md) | | [optional] +**geoipBinding** | [**GeoipBindingEnum**](GeoipBindingEnum.md) | | [optional] diff --git a/schema.yml b/schema.yml index 72d68e5..d63b0c1 100644 --- a/schema.yml +++ b/schema.yml @@ -26955,10 +26955,42 @@ paths: operationId: stages_user_login_list description: UserLoginStage Viewset parameters: + - in: query + name: geoip_binding + schema: + type: string + enum: + - bind_continent + - bind_continent_country + - bind_continent_country_city + - no_binding + description: |- + Bind sessions created by this stage to the configured GeoIP location + + * `no_binding` - No Binding + * `bind_continent` - Bind Continent + * `bind_continent_country` - Bind Continent Country + * `bind_continent_country_city` - Bind Continent Country City - in: query name: name schema: type: string + - in: query + name: network_binding + schema: + type: string + enum: + - bind_asn + - bind_asn_network + - bind_asn_network_ip + - no_binding + description: |- + Bind sessions created by this stage to the configured network + + * `no_binding` - No Binding + * `bind_asn` - Bind Asn + * `bind_asn_network` - Bind Asn Network + * `bind_asn_network_ip` - Bind Asn Network Ip - name: ordering required: false in: query @@ -31829,6 +31861,18 @@ components: type: string required: - detail + GeoipBindingEnum: + enum: + - no_binding + - bind_continent + - bind_continent_country + - bind_continent_country_city + type: string + description: |- + * `no_binding` - No Binding + * `bind_continent` - Bind Continent + * `bind_continent_country` - Bind Continent Country + * `bind_continent_country_city` - Bind Continent Country City Group: type: object description: Group Serializer @@ -33405,6 +33449,18 @@ components: * `urn:oasis:names:tc:SAML:2.0:nameid-format:X509SubjectName` - X509 * `urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName` - Windows * `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` - Transient + NetworkBindingEnum: + enum: + - no_binding + - bind_asn + - bind_asn_network + - bind_asn_network_ip + type: string + description: |- + * `no_binding` - No Binding + * `bind_asn` - Bind Asn + * `bind_asn_network` - Bind Asn Network + * `bind_asn_network_ip` - Bind Asn Network Ip NotConfiguredActionEnum: enum: - skip @@ -38080,6 +38136,26 @@ components: description: 'Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3)' + network_binding: + allOf: + - $ref: '#/components/schemas/NetworkBindingEnum' + description: |- + Bind sessions created by this stage to the configured network + + * `no_binding` - No Binding + * `bind_asn` - Bind Asn + * `bind_asn_network` - Bind Asn Network + * `bind_asn_network_ip` - Bind Asn Network Ip + geoip_binding: + allOf: + - $ref: '#/components/schemas/GeoipBindingEnum' + description: |- + Bind sessions created by this stage to the configured GeoIP location + + * `no_binding` - No Binding + * `bind_continent` - Bind Continent + * `bind_continent_country` - Bind Continent Country + * `bind_continent_country_city` - Bind Continent Country City PatchedUserLogoutStageRequest: type: object description: UserLogoutStage Serializer @@ -39111,13 +39187,13 @@ components: ProviderTypeEnum: enum: - apple + - openidconnect - azuread - discord - facebook - github - google - mailcow - - openidconnect - okta - patreon - reddit @@ -39126,13 +39202,13 @@ components: type: string description: |- * `apple` - Apple + * `openidconnect` - OpenID Connect * `azuread` - Azure AD * `discord` - Discord * `facebook` - Facebook * `github` - GitHub * `google` - Google * `mailcow` - Mailcow - * `openidconnect` - OpenID Connect * `okta` - Okta * `patreon` - Patreon * `reddit` - Reddit @@ -42052,6 +42128,26 @@ components: description: 'Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3)' + network_binding: + allOf: + - $ref: '#/components/schemas/NetworkBindingEnum' + description: |- + Bind sessions created by this stage to the configured network + + * `no_binding` - No Binding + * `bind_asn` - Bind Asn + * `bind_asn_network` - Bind Asn Network + * `bind_asn_network_ip` - Bind Asn Network Ip + geoip_binding: + allOf: + - $ref: '#/components/schemas/GeoipBindingEnum' + description: |- + Bind sessions created by this stage to the configured GeoIP location + + * `no_binding` - No Binding + * `bind_continent` - Bind Continent + * `bind_continent_country` - Bind Continent Country + * `bind_continent_country_city` - Bind Continent Country City required: - component - meta_model_name @@ -42084,6 +42180,26 @@ components: description: 'Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3)' + network_binding: + allOf: + - $ref: '#/components/schemas/NetworkBindingEnum' + description: |- + Bind sessions created by this stage to the configured network + + * `no_binding` - No Binding + * `bind_asn` - Bind Asn + * `bind_asn_network` - Bind Asn Network + * `bind_asn_network_ip` - Bind Asn Network Ip + geoip_binding: + allOf: + - $ref: '#/components/schemas/GeoipBindingEnum' + description: |- + Bind sessions created by this stage to the configured GeoIP location + + * `no_binding` - No Binding + * `bind_continent` - Bind Continent + * `bind_continent_country` - Bind Continent Country + * `bind_continent_country_city` - Bind Continent Country City required: - name UserLogoutStage: diff --git a/src/main/kotlin/io/goauthentik/api/apis/StagesApi.kt b/src/main/kotlin/io/goauthentik/api/apis/StagesApi.kt index fa0a062..31b7063 100644 --- a/src/main/kotlin/io/goauthentik/api/apis/StagesApi.kt +++ b/src/main/kotlin/io/goauthentik/api/apis/StagesApi.kt @@ -11212,10 +11212,32 @@ class StagesApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient ) } + /** + * enum for parameter geoipBinding + */ + enum class GeoipBindingStagesUserLoginList(val value: kotlin.String) { + @Json(name = "bind_continent") bindContinent("bind_continent"), + @Json(name = "bind_continent_country") bindContinentCountry("bind_continent_country"), + @Json(name = "bind_continent_country_city") bindContinentCountryCity("bind_continent_country_city"), + @Json(name = "no_binding") noBinding("no_binding"), + } + + /** + * enum for parameter networkBinding + */ + enum class NetworkBindingStagesUserLoginList(val value: kotlin.String) { + @Json(name = "bind_asn") bindAsn("bind_asn"), + @Json(name = "bind_asn_network") bindAsnNetwork("bind_asn_network"), + @Json(name = "bind_asn_network_ip") bindAsnNetworkIp("bind_asn_network_ip"), + @Json(name = "no_binding") noBinding("no_binding"), + } + /** * * UserLoginStage Viewset + * @param geoipBinding Bind sessions created by this stage to the configured GeoIP location * `no_binding` - No Binding * `bind_continent` - Bind Continent * `bind_continent_country` - Bind Continent Country * `bind_continent_country_city` - Bind Continent Country City (optional) * @param name (optional) + * @param networkBinding Bind sessions created by this stage to the configured network * `no_binding` - No Binding * `bind_asn` - Bind Asn * `bind_asn_network` - Bind Asn Network * `bind_asn_network_ip` - Bind Asn Network Ip (optional) * @param ordering Which field to use when ordering the results. (optional) * @param page A page number within the paginated result set. (optional) * @param pageSize Number of results to return per page. (optional) @@ -11233,8 +11255,8 @@ class StagesApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient */ @Suppress("UNCHECKED_CAST") @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun stagesUserLoginList(name: kotlin.String? = null, ordering: kotlin.String? = null, page: kotlin.Int? = null, pageSize: kotlin.Int? = null, rememberMeOffset: kotlin.String? = null, search: kotlin.String? = null, sessionDuration: kotlin.String? = null, stageUuid: java.util.UUID? = null, terminateOtherSessions: kotlin.Boolean? = null) : PaginatedUserLoginStageList { - val localVarResponse = stagesUserLoginListWithHttpInfo(name = name, ordering = ordering, page = page, pageSize = pageSize, rememberMeOffset = rememberMeOffset, search = search, sessionDuration = sessionDuration, stageUuid = stageUuid, terminateOtherSessions = terminateOtherSessions) + fun stagesUserLoginList(geoipBinding: GeoipBindingStagesUserLoginList? = null, name: kotlin.String? = null, networkBinding: NetworkBindingStagesUserLoginList? = null, ordering: kotlin.String? = null, page: kotlin.Int? = null, pageSize: kotlin.Int? = null, rememberMeOffset: kotlin.String? = null, search: kotlin.String? = null, sessionDuration: kotlin.String? = null, stageUuid: java.util.UUID? = null, terminateOtherSessions: kotlin.Boolean? = null) : PaginatedUserLoginStageList { + val localVarResponse = stagesUserLoginListWithHttpInfo(geoipBinding = geoipBinding, name = name, networkBinding = networkBinding, ordering = ordering, page = page, pageSize = pageSize, rememberMeOffset = rememberMeOffset, search = search, sessionDuration = sessionDuration, stageUuid = stageUuid, terminateOtherSessions = terminateOtherSessions) return when (localVarResponse.responseType) { ResponseType.Success -> (localVarResponse as Success<*>).data as PaginatedUserLoginStageList @@ -11254,7 +11276,9 @@ class StagesApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient /** * * UserLoginStage Viewset + * @param geoipBinding Bind sessions created by this stage to the configured GeoIP location * `no_binding` - No Binding * `bind_continent` - Bind Continent * `bind_continent_country` - Bind Continent Country * `bind_continent_country_city` - Bind Continent Country City (optional) * @param name (optional) + * @param networkBinding Bind sessions created by this stage to the configured network * `no_binding` - No Binding * `bind_asn` - Bind Asn * `bind_asn_network` - Bind Asn Network * `bind_asn_network_ip` - Bind Asn Network Ip (optional) * @param ordering Which field to use when ordering the results. (optional) * @param page A page number within the paginated result set. (optional) * @param pageSize Number of results to return per page. (optional) @@ -11269,8 +11293,8 @@ class StagesApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient */ @Suppress("UNCHECKED_CAST") @Throws(IllegalStateException::class, IOException::class) - fun stagesUserLoginListWithHttpInfo(name: kotlin.String?, ordering: kotlin.String?, page: kotlin.Int?, pageSize: kotlin.Int?, rememberMeOffset: kotlin.String?, search: kotlin.String?, sessionDuration: kotlin.String?, stageUuid: java.util.UUID?, terminateOtherSessions: kotlin.Boolean?) : ApiResponse { - val localVariableConfig = stagesUserLoginListRequestConfig(name = name, ordering = ordering, page = page, pageSize = pageSize, rememberMeOffset = rememberMeOffset, search = search, sessionDuration = sessionDuration, stageUuid = stageUuid, terminateOtherSessions = terminateOtherSessions) + fun stagesUserLoginListWithHttpInfo(geoipBinding: GeoipBindingStagesUserLoginList?, name: kotlin.String?, networkBinding: NetworkBindingStagesUserLoginList?, ordering: kotlin.String?, page: kotlin.Int?, pageSize: kotlin.Int?, rememberMeOffset: kotlin.String?, search: kotlin.String?, sessionDuration: kotlin.String?, stageUuid: java.util.UUID?, terminateOtherSessions: kotlin.Boolean?) : ApiResponse { + val localVariableConfig = stagesUserLoginListRequestConfig(geoipBinding = geoipBinding, name = name, networkBinding = networkBinding, ordering = ordering, page = page, pageSize = pageSize, rememberMeOffset = rememberMeOffset, search = search, sessionDuration = sessionDuration, stageUuid = stageUuid, terminateOtherSessions = terminateOtherSessions) return request( localVariableConfig @@ -11280,7 +11304,9 @@ class StagesApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient /** * To obtain the request config of the operation stagesUserLoginList * + * @param geoipBinding Bind sessions created by this stage to the configured GeoIP location * `no_binding` - No Binding * `bind_continent` - Bind Continent * `bind_continent_country` - Bind Continent Country * `bind_continent_country_city` - Bind Continent Country City (optional) * @param name (optional) + * @param networkBinding Bind sessions created by this stage to the configured network * `no_binding` - No Binding * `bind_asn` - Bind Asn * `bind_asn_network` - Bind Asn Network * `bind_asn_network_ip` - Bind Asn Network Ip (optional) * @param ordering Which field to use when ordering the results. (optional) * @param page A page number within the paginated result set. (optional) * @param pageSize Number of results to return per page. (optional) @@ -11291,13 +11317,19 @@ class StagesApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient * @param terminateOtherSessions (optional) * @return RequestConfig */ - fun stagesUserLoginListRequestConfig(name: kotlin.String?, ordering: kotlin.String?, page: kotlin.Int?, pageSize: kotlin.Int?, rememberMeOffset: kotlin.String?, search: kotlin.String?, sessionDuration: kotlin.String?, stageUuid: java.util.UUID?, terminateOtherSessions: kotlin.Boolean?) : RequestConfig { + fun stagesUserLoginListRequestConfig(geoipBinding: GeoipBindingStagesUserLoginList?, name: kotlin.String?, networkBinding: NetworkBindingStagesUserLoginList?, ordering: kotlin.String?, page: kotlin.Int?, pageSize: kotlin.Int?, rememberMeOffset: kotlin.String?, search: kotlin.String?, sessionDuration: kotlin.String?, stageUuid: java.util.UUID?, terminateOtherSessions: kotlin.Boolean?) : RequestConfig { val localVariableBody = null val localVariableQuery: MultiValueMap = mutableMapOf>() .apply { + if (geoipBinding != null) { + put("geoip_binding", listOf(geoipBinding.value)) + } if (name != null) { put("name", listOf(name.toString())) } + if (networkBinding != null) { + put("network_binding", listOf(networkBinding.value)) + } if (ordering != null) { put("ordering", listOf(ordering.toString())) } diff --git a/src/main/kotlin/io/goauthentik/api/infrastructure/SerializerHelper.kt b/src/main/kotlin/io/goauthentik/api/infrastructure/SerializerHelper.kt index e598c1e..ba81de9 100644 --- a/src/main/kotlin/io/goauthentik/api/infrastructure/SerializerHelper.kt +++ b/src/main/kotlin/io/goauthentik/api/infrastructure/SerializerHelper.kt @@ -46,6 +46,8 @@ object SerializerHelper { .withUnknownFallback(io.goauthentik.api.models.FlowDesignationEnum.unknownDefaultOpenApi)) .add(io.goauthentik.api.models.FlowLayoutEnum::class.java, EnumJsonAdapter.create(io.goauthentik.api.models.FlowLayoutEnum::class.java) .withUnknownFallback(io.goauthentik.api.models.FlowLayoutEnum.unknownDefaultOpenApi)) + .add(io.goauthentik.api.models.GeoipBindingEnum::class.java, EnumJsonAdapter.create(io.goauthentik.api.models.GeoipBindingEnum::class.java) + .withUnknownFallback(io.goauthentik.api.models.GeoipBindingEnum.unknownDefaultOpenApi)) .add(io.goauthentik.api.models.IntentEnum::class.java, EnumJsonAdapter.create(io.goauthentik.api.models.IntentEnum::class.java) .withUnknownFallback(io.goauthentik.api.models.IntentEnum.unknownDefaultOpenApi)) .add(io.goauthentik.api.models.InvalidResponseActionEnum::class.java, EnumJsonAdapter.create(io.goauthentik.api.models.InvalidResponseActionEnum::class.java) @@ -58,6 +60,8 @@ object SerializerHelper { .withUnknownFallback(io.goauthentik.api.models.ModelEnum.unknownDefaultOpenApi)) .add(io.goauthentik.api.models.NameIdPolicyEnum::class.java, EnumJsonAdapter.create(io.goauthentik.api.models.NameIdPolicyEnum::class.java) .withUnknownFallback(io.goauthentik.api.models.NameIdPolicyEnum.unknownDefaultOpenApi)) + .add(io.goauthentik.api.models.NetworkBindingEnum::class.java, EnumJsonAdapter.create(io.goauthentik.api.models.NetworkBindingEnum::class.java) + .withUnknownFallback(io.goauthentik.api.models.NetworkBindingEnum.unknownDefaultOpenApi)) .add(io.goauthentik.api.models.NotConfiguredActionEnum::class.java, EnumJsonAdapter.create(io.goauthentik.api.models.NotConfiguredActionEnum::class.java) .withUnknownFallback(io.goauthentik.api.models.NotConfiguredActionEnum.unknownDefaultOpenApi)) .add(io.goauthentik.api.models.NotificationTransportModeEnum::class.java, EnumJsonAdapter.create(io.goauthentik.api.models.NotificationTransportModeEnum::class.java) diff --git a/src/main/kotlin/io/goauthentik/api/models/GeoipBindingEnum.kt b/src/main/kotlin/io/goauthentik/api/models/GeoipBindingEnum.kt new file mode 100644 index 0000000..2bd7287 --- /dev/null +++ b/src/main/kotlin/io/goauthentik/api/models/GeoipBindingEnum.kt @@ -0,0 +1,72 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package io.goauthentik.api.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * * `no_binding` - No Binding * `bind_continent` - Bind Continent * `bind_continent_country` - Bind Continent Country * `bind_continent_country_city` - Bind Continent Country City + * + * Values: noBinding,bindContinent,bindContinentCountry,bindContinentCountryCity,unknownDefaultOpenApi + */ + +@JsonClass(generateAdapter = false) +enum class GeoipBindingEnum(val value: kotlin.String) { + + @Json(name = "no_binding") + noBinding("no_binding"), + + @Json(name = "bind_continent") + bindContinent("bind_continent"), + + @Json(name = "bind_continent_country") + bindContinentCountry("bind_continent_country"), + + @Json(name = "bind_continent_country_city") + bindContinentCountryCity("bind_continent_country_city"), + + @Json(name = "unknown_default_open_api") + unknownDefaultOpenApi("unknown_default_open_api"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is GeoipBindingEnum) "$data" else null + + /** + * Returns a valid [GeoipBindingEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): GeoipBindingEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/src/main/kotlin/io/goauthentik/api/models/NetworkBindingEnum.kt b/src/main/kotlin/io/goauthentik/api/models/NetworkBindingEnum.kt new file mode 100644 index 0000000..ff7905c --- /dev/null +++ b/src/main/kotlin/io/goauthentik/api/models/NetworkBindingEnum.kt @@ -0,0 +1,72 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package io.goauthentik.api.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * * `no_binding` - No Binding * `bind_asn` - Bind Asn * `bind_asn_network` - Bind Asn Network * `bind_asn_network_ip` - Bind Asn Network Ip + * + * Values: noBinding,bindAsn,bindAsnNetwork,bindAsnNetworkIp,unknownDefaultOpenApi + */ + +@JsonClass(generateAdapter = false) +enum class NetworkBindingEnum(val value: kotlin.String) { + + @Json(name = "no_binding") + noBinding("no_binding"), + + @Json(name = "bind_asn") + bindAsn("bind_asn"), + + @Json(name = "bind_asn_network") + bindAsnNetwork("bind_asn_network"), + + @Json(name = "bind_asn_network_ip") + bindAsnNetworkIp("bind_asn_network_ip"), + + @Json(name = "unknown_default_open_api") + unknownDefaultOpenApi("unknown_default_open_api"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is NetworkBindingEnum) "$data" else null + + /** + * Returns a valid [NetworkBindingEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): NetworkBindingEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/src/main/kotlin/io/goauthentik/api/models/PatchedUserLoginStageRequest.kt b/src/main/kotlin/io/goauthentik/api/models/PatchedUserLoginStageRequest.kt index fba27c0..5656836 100644 --- a/src/main/kotlin/io/goauthentik/api/models/PatchedUserLoginStageRequest.kt +++ b/src/main/kotlin/io/goauthentik/api/models/PatchedUserLoginStageRequest.kt @@ -16,6 +16,8 @@ package io.goauthentik.api.models import io.goauthentik.api.models.FlowSetRequest +import io.goauthentik.api.models.GeoipBindingEnum +import io.goauthentik.api.models.NetworkBindingEnum import com.squareup.moshi.Json import com.squareup.moshi.JsonClass @@ -28,6 +30,8 @@ import com.squareup.moshi.JsonClass * @param sessionDuration Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) * @param terminateOtherSessions Terminate all other sessions of the user logging in. * @param rememberMeOffset Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) + * @param networkBinding + * @param geoipBinding */ @@ -49,7 +53,13 @@ data class PatchedUserLoginStageRequest ( /* Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) */ @Json(name = "remember_me_offset") - val rememberMeOffset: kotlin.String? = null + val rememberMeOffset: kotlin.String? = null, + + @Json(name = "network_binding") + val networkBinding: NetworkBindingEnum? = null, + + @Json(name = "geoip_binding") + val geoipBinding: GeoipBindingEnum? = null ) diff --git a/src/main/kotlin/io/goauthentik/api/models/ProviderTypeEnum.kt b/src/main/kotlin/io/goauthentik/api/models/ProviderTypeEnum.kt index f320ba8..bd332a3 100644 --- a/src/main/kotlin/io/goauthentik/api/models/ProviderTypeEnum.kt +++ b/src/main/kotlin/io/goauthentik/api/models/ProviderTypeEnum.kt @@ -20,9 +20,9 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * * `apple` - Apple * `azuread` - Azure AD * `discord` - Discord * `facebook` - Facebook * `github` - GitHub * `google` - Google * `mailcow` - Mailcow * `openidconnect` - OpenID Connect * `okta` - Okta * `patreon` - Patreon * `reddit` - Reddit * `twitch` - Twitch * `twitter` - Twitter + * * `apple` - Apple * `openidconnect` - OpenID Connect * `azuread` - Azure AD * `discord` - Discord * `facebook` - Facebook * `github` - GitHub * `google` - Google * `mailcow` - Mailcow * `okta` - Okta * `patreon` - Patreon * `reddit` - Reddit * `twitch` - Twitch * `twitter` - Twitter * - * Values: apple,azuread,discord,facebook,github,google,mailcow,openidconnect,okta,patreon,reddit,twitch,twitter,unknownDefaultOpenApi + * Values: apple,openidconnect,azuread,discord,facebook,github,google,mailcow,okta,patreon,reddit,twitch,twitter,unknownDefaultOpenApi */ @JsonClass(generateAdapter = false) @@ -31,6 +31,9 @@ enum class ProviderTypeEnum(val value: kotlin.String) { @Json(name = "apple") apple("apple"), + @Json(name = "openidconnect") + openidconnect("openidconnect"), + @Json(name = "azuread") azuread("azuread"), @@ -49,9 +52,6 @@ enum class ProviderTypeEnum(val value: kotlin.String) { @Json(name = "mailcow") mailcow("mailcow"), - @Json(name = "openidconnect") - openidconnect("openidconnect"), - @Json(name = "okta") okta("okta"), diff --git a/src/main/kotlin/io/goauthentik/api/models/UserLoginStage.kt b/src/main/kotlin/io/goauthentik/api/models/UserLoginStage.kt index f8e40d4..dc56cb4 100644 --- a/src/main/kotlin/io/goauthentik/api/models/UserLoginStage.kt +++ b/src/main/kotlin/io/goauthentik/api/models/UserLoginStage.kt @@ -16,6 +16,8 @@ package io.goauthentik.api.models import io.goauthentik.api.models.FlowSet +import io.goauthentik.api.models.GeoipBindingEnum +import io.goauthentik.api.models.NetworkBindingEnum import com.squareup.moshi.Json import com.squareup.moshi.JsonClass @@ -33,6 +35,8 @@ import com.squareup.moshi.JsonClass * @param sessionDuration Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) * @param terminateOtherSessions Terminate all other sessions of the user logging in. * @param rememberMeOffset Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) + * @param networkBinding + * @param geoipBinding */ @@ -73,7 +77,13 @@ data class UserLoginStage ( /* Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) */ @Json(name = "remember_me_offset") - val rememberMeOffset: kotlin.String? = null + val rememberMeOffset: kotlin.String? = null, + + @Json(name = "network_binding") + val networkBinding: NetworkBindingEnum? = null, + + @Json(name = "geoip_binding") + val geoipBinding: GeoipBindingEnum? = null ) diff --git a/src/main/kotlin/io/goauthentik/api/models/UserLoginStageRequest.kt b/src/main/kotlin/io/goauthentik/api/models/UserLoginStageRequest.kt index 551cd27..2bb68e4 100644 --- a/src/main/kotlin/io/goauthentik/api/models/UserLoginStageRequest.kt +++ b/src/main/kotlin/io/goauthentik/api/models/UserLoginStageRequest.kt @@ -16,6 +16,8 @@ package io.goauthentik.api.models import io.goauthentik.api.models.FlowSetRequest +import io.goauthentik.api.models.GeoipBindingEnum +import io.goauthentik.api.models.NetworkBindingEnum import com.squareup.moshi.Json import com.squareup.moshi.JsonClass @@ -28,6 +30,8 @@ import com.squareup.moshi.JsonClass * @param sessionDuration Determines how long a session lasts. Default of 0 means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3) * @param terminateOtherSessions Terminate all other sessions of the user logging in. * @param rememberMeOffset Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) + * @param networkBinding + * @param geoipBinding */ @@ -49,7 +53,13 @@ data class UserLoginStageRequest ( /* Offset the session will be extended by when the user picks the remember me option. Default of 0 means that the remember me option will not be shown. (Format: hours=-1;minutes=-2;seconds=-3) */ @Json(name = "remember_me_offset") - val rememberMeOffset: kotlin.String? = null + val rememberMeOffset: kotlin.String? = null, + + @Json(name = "network_binding") + val networkBinding: NetworkBindingEnum? = null, + + @Json(name = "geoip_binding") + val geoipBinding: GeoipBindingEnum? = null )