Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Update API Client
Browse files Browse the repository at this point in the history
#### What's Changed
---

##### `GET` /core/authenticated_sessions/{uuid}/

###### Return Type:

Changed response : **200 OK**

* Changed content type : `application/json`

    New required properties:
    - `asn`

    * Added property `asn` (object)
        > Get ASN Data

        * Property `asn` (integer)

        * Property `as_org` (string)

        * Property `network` (string)

    * Changed property `geo_ip` (object)
        > Get GeoIP Data

##### `GET` /policies/reputation/scores/{reputation_uuid}/

###### Return Type:

Changed response : **200 OK**

* Changed content type : `application/json`

    * Added property `ip_asn_data` (object)

##### `GET` /core/authenticated_sessions/

###### Return Type:

Changed response : **200 OK**

* Changed content type : `application/json`

    * Changed property `results` (array)

        Changed items (object):
            > AuthenticatedSession Serializer

        New required properties:
        - `asn`

        * Added property `asn` (object)
            > Get ASN Data

        * Changed property `geo_ip` (object)
            > Get GeoIP Data

##### `GET` /policies/reputation/scores/

###### Return Type:

Changed response : **200 OK**

* Changed content type : `application/json`

    * Changed property `results` (array)

        Changed items (object):
            > Reputation Serializer

        * Added property `ip_asn_data` (object)

##### `GET` /root/config/

###### Return Type:

Changed response : **200 OK**

* Changed content type : `application/json`

    * Changed property `capabilities` (array)

        Changed items (string):
            > * `can_save_media` - Can Save Media
            > * `can_geo_ip` - Can Geo Ip
            > * `can_asn` - Can Asn
            > * `can_impersonate` - Can Impersonate
            > * `can_debug` - Can Debug
            > * `is_enterprise` - Is Enterprise

        Added enum value:

        * `can_asn`
  • Loading branch information
authentik-automation[bot] committed Dec 20, 2023
1 parent b58486a commit 2ef8d85
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ docs/AuthTypeEnum.md
docs/AuthenticateWebAuthnStage.md
docs/AuthenticateWebAuthnStageRequest.md
docs/AuthenticatedSession.md
docs/AuthenticatedSessionAsn.md
docs/AuthenticatedSessionGeoIp.md
docs/AuthenticatedSessionUserAgent.md
docs/AuthenticatedSessionUserAgentDevice.md
Expand Down Expand Up @@ -575,6 +576,7 @@ src/main/kotlin/io/goauthentik/api/models/AuthTypeEnum.kt
src/main/kotlin/io/goauthentik/api/models/AuthenticateWebAuthnStage.kt
src/main/kotlin/io/goauthentik/api/models/AuthenticateWebAuthnStageRequest.kt
src/main/kotlin/io/goauthentik/api/models/AuthenticatedSession.kt
src/main/kotlin/io/goauthentik/api/models/AuthenticatedSessionAsn.kt
src/main/kotlin/io/goauthentik/api/models/AuthenticatedSessionGeoIp.kt
src/main/kotlin/io/goauthentik/api/models/AuthenticatedSessionUserAgent.kt
src/main/kotlin/io/goauthentik/api/models/AuthenticatedSessionUserAgentDevice.kt
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ Class | Method | HTTP request | Description
- [AuthenticateWebAuthnStage](docs/AuthenticateWebAuthnStage.md)
- [AuthenticateWebAuthnStageRequest](docs/AuthenticateWebAuthnStageRequest.md)
- [AuthenticatedSession](docs/AuthenticatedSession.md)
- [AuthenticatedSessionAsn](docs/AuthenticatedSessionAsn.md)
- [AuthenticatedSessionGeoIp](docs/AuthenticatedSessionGeoIp.md)
- [AuthenticatedSessionUserAgent](docs/AuthenticatedSessionUserAgent.md)
- [AuthenticatedSessionUserAgentDevice](docs/AuthenticatedSessionUserAgentDevice.md)
Expand Down
1 change: 1 addition & 0 deletions docs/AuthenticatedSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**current** | **kotlin.Boolean** | Check if session is currently active session | [readonly]
**userAgent** | [**AuthenticatedSessionUserAgent**](AuthenticatedSessionUserAgent.md) | |
**geoIp** | [**AuthenticatedSessionGeoIp**](AuthenticatedSessionGeoIp.md) | |
**asn** | [**AuthenticatedSessionAsn**](AuthenticatedSessionAsn.md) | |
**user** | **kotlin.Int** | |
**lastIp** | **kotlin.String** | |
**lastUsed** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [readonly]
Expand Down
12 changes: 12 additions & 0 deletions docs/AuthenticatedSessionAsn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# AuthenticatedSessionAsn

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asn** | **kotlin.Int** | |
**asOrg** | **kotlin.String** | |
**network** | **kotlin.String** | |



2 changes: 2 additions & 0 deletions docs/CapabilitiesEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

* `canGeoIp` (value: `"can_geo_ip"`)

* `canAsn` (value: `"can_asn"`)

* `canImpersonate` (value: `"can_impersonate"`)

* `canDebug` (value: `"can_debug"`)
Expand Down
1 change: 1 addition & 0 deletions docs/Reputation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**updated** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [readonly]
**pk** | [**java.util.UUID**](java.util.UUID.md) | | [optional]
**ipGeoData** | [**kotlin.Any**](.md) | | [optional]
**ipAsnData** | [**kotlin.Any**](.md) | | [optional]
**score** | **kotlin.Long** | | [optional]


Expand Down
24 changes: 23 additions & 1 deletion schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28280,7 +28280,7 @@ components:
readOnly: true
geo_ip:
type: object
description: Get parsed user agent
description: Get GeoIP Data
properties:
continent:
type: string
Expand All @@ -28302,6 +28302,24 @@ components:
- long
nullable: true
readOnly: true
asn:
type: object
description: Get ASN Data
properties:
asn:
type: integer
as_org:
type: string
nullable: true
network:
type: string
nullable: true
required:
- as_org
- asn
- network
nullable: true
readOnly: true
user:
type: integer
last_ip:
Expand All @@ -28316,6 +28334,7 @@ components:
type: string
format: date-time
required:
- asn
- current
- geo_ip
- last_ip
Expand Down Expand Up @@ -29283,13 +29302,15 @@ components:
enum:
- can_save_media
- can_geo_ip
- can_asn
- can_impersonate
- can_debug
- is_enterprise
type: string
description: |-
* `can_save_media` - Can Save Media
* `can_geo_ip` - Can Geo Ip
* `can_asn` - Can Asn
* `can_impersonate` - Can Impersonate
* `can_debug` - Can Debug
* `is_enterprise` - Is Enterprise
Expand Down Expand Up @@ -39667,6 +39688,7 @@ components:
ip:
type: string
ip_geo_data: {}
ip_asn_data: {}
score:
type: integer
maximum: 9223372036854775807
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package io.goauthentik.api.models

import io.goauthentik.api.models.AuthenticatedSessionAsn
import io.goauthentik.api.models.AuthenticatedSessionGeoIp
import io.goauthentik.api.models.AuthenticatedSessionUserAgent

Expand All @@ -27,6 +28,7 @@ import com.squareup.moshi.JsonClass
* @param current Check if session is currently active session
* @param userAgent
* @param geoIp
* @param asn
* @param user
* @param lastIp
* @param lastUsed
Expand All @@ -48,6 +50,9 @@ data class AuthenticatedSession (
@Json(name = "geo_ip")
val geoIp: AuthenticatedSessionGeoIp?,

@Json(name = "asn")
val asn: AuthenticatedSessionAsn?,

@Json(name = "user")
val user: kotlin.Int,

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
*
* 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

/**
* Get ASN Data
*
* @param asn
* @param asOrg
* @param network
*/


data class AuthenticatedSessionAsn (

@Json(name = "asn")
val asn: kotlin.Int,

@Json(name = "as_org")
val asOrg: kotlin.String?,

@Json(name = "network")
val network: kotlin.String?

)

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
* Get parsed user agent
* Get GeoIP Data
*
* @param continent
* @param country
Expand Down
7 changes: 5 additions & 2 deletions src/main/kotlin/io/goauthentik/api/models/CapabilitiesEnum.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
* * `can_save_media` - Can Save Media * `can_geo_ip` - Can Geo Ip * `can_impersonate` - Can Impersonate * `can_debug` - Can Debug * `is_enterprise` - Is Enterprise
* * `can_save_media` - Can Save Media * `can_geo_ip` - Can Geo Ip * `can_asn` - Can Asn * `can_impersonate` - Can Impersonate * `can_debug` - Can Debug * `is_enterprise` - Is Enterprise
*
* Values: canSaveMedia,canGeoIp,canImpersonate,canDebug,isEnterprise,unknownDefaultOpenApi
* Values: canSaveMedia,canGeoIp,canAsn,canImpersonate,canDebug,isEnterprise,unknownDefaultOpenApi
*/

@JsonClass(generateAdapter = false)
Expand All @@ -34,6 +34,9 @@ enum class CapabilitiesEnum(val value: kotlin.String) {
@Json(name = "can_geo_ip")
canGeoIp("can_geo_ip"),

@Json(name = "can_asn")
canAsn("can_asn"),

@Json(name = "can_impersonate")
canImpersonate("can_impersonate"),

Expand Down
4 changes: 4 additions & 0 deletions src/main/kotlin/io/goauthentik/api/models/Reputation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.squareup.moshi.JsonClass
* @param updated
* @param pk
* @param ipGeoData
* @param ipAsnData
* @param score
*/

Expand All @@ -48,6 +49,9 @@ data class Reputation (
@Json(name = "ip_geo_data")
val ipGeoData: kotlin.Any? = null,

@Json(name = "ip_asn_data")
val ipAsnData: kotlin.Any? = null,

@Json(name = "score")
val score: kotlin.Long? = null

Expand Down

0 comments on commit 2ef8d85

Please sign in to comment.