Skip to content

Commit

Permalink
autogen(openapi): regenerate swagger spec and internal client
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
ory-bot committed Mar 13, 2023
1 parent b42482b commit a329aff
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 27 deletions.
2 changes: 1 addition & 1 deletion internal/httpclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Class | Method | HTTP request | Description
*OAuth2Api* | [**RejectOAuth2LoginRequest**](docs/OAuth2Api.md#rejectoauth2loginrequest) | **Put** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request
*OAuth2Api* | [**RejectOAuth2LogoutRequest**](docs/OAuth2Api.md#rejectoauth2logoutrequest) | **Put** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request
*OAuth2Api* | [**RevokeOAuth2ConsentSessions**](docs/OAuth2Api.md#revokeoauth2consentsessions) | **Delete** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject
*OAuth2Api* | [**RevokeOAuth2LoginSessions**](docs/OAuth2Api.md#revokeoauth2loginsessions) | **Delete** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject
*OAuth2Api* | [**RevokeOAuth2LoginSessions**](docs/OAuth2Api.md#revokeoauth2loginsessions) | **Delete** /admin/oauth2/auth/sessions/login | Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID
*OAuth2Api* | [**RevokeOAuth2Token**](docs/OAuth2Api.md#revokeoauth2token) | **Post** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token
*OAuth2Api* | [**SetOAuth2Client**](docs/OAuth2Api.md#setoauth2client) | **Put** /admin/clients/{id} | Set OAuth 2.0 Client
*OAuth2Api* | [**SetOAuth2ClientLifespans**](docs/OAuth2Api.md#setoauth2clientlifespans) | **Put** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans
Expand Down
28 changes: 22 additions & 6 deletions internal/httpclient/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1130,10 +1130,15 @@ paths:
- oAuth2
/admin/oauth2/auth/sessions/login:
delete:
description: "This endpoint invalidates a subject's authentication session.\
\ After revoking the authentication session, the subject\nhas to re-authenticate\
\ at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens\
\ and\ndoes not work with OpenID Connect Front- or Back-channel logout."
description: "This endpoint invalidates authentication sessions. After revoking\
\ the authentication session(s), the subject\nhas to re-authenticate at the\
\ Ory OAuth2 Provider. This endpoint does not invalidate any tokens.\n\nIf\
\ you send the subject in a query param, all authentication sessions that\
\ belong to that subject are revoked.\nNo OpennID Connect Front- or Back-channel\
\ logout is performed in this case.\n\nAlternatively, you can send a SessionID\
\ via `sid` query param, in which case, only the session that is connected\n\
to that SessionID is revoked. OpenID Connect Back-channel logout is performed\
\ in this case."
operationId: revokeOAuth2LoginSessions
parameters:
- description: |-
Expand All @@ -1143,7 +1148,18 @@ paths:
explode: true
in: query
name: subject
required: true
required: false
schema:
type: string
style: form
- description: |-
OAuth 2.0 Subject
The subject to revoke authentication sessions for.
explode: true
in: query
name: sid
required: false
schema:
type: string
style: form
Expand All @@ -1157,7 +1173,7 @@ paths:
schema:
$ref: '#/components/schemas/errorOAuth2'
description: errorOAuth2
summary: Revokes All OAuth 2.0 Login Sessions of a Subject
summary: Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID
tags:
- oAuth2
/admin/oauth2/introspect:
Expand Down
30 changes: 22 additions & 8 deletions internal/httpclient/api_o_auth2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions internal/httpclient/docs/OAuth2Api.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Method | HTTP request | Description
[**RejectOAuth2LoginRequest**](OAuth2Api.md#RejectOAuth2LoginRequest) | **Put** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request
[**RejectOAuth2LogoutRequest**](OAuth2Api.md#RejectOAuth2LogoutRequest) | **Put** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request
[**RevokeOAuth2ConsentSessions**](OAuth2Api.md#RevokeOAuth2ConsentSessions) | **Delete** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject
[**RevokeOAuth2LoginSessions**](OAuth2Api.md#RevokeOAuth2LoginSessions) | **Delete** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject
[**RevokeOAuth2LoginSessions**](OAuth2Api.md#RevokeOAuth2LoginSessions) | **Delete** /admin/oauth2/auth/sessions/login | Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID
[**RevokeOAuth2Token**](OAuth2Api.md#RevokeOAuth2Token) | **Post** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token
[**SetOAuth2Client**](OAuth2Api.md#SetOAuth2Client) | **Put** /admin/clients/{id} | Set OAuth 2.0 Client
[**SetOAuth2ClientLifespans**](OAuth2Api.md#SetOAuth2ClientLifespans) | **Put** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans
Expand Down Expand Up @@ -1600,9 +1600,9 @@ No authorization required

## RevokeOAuth2LoginSessions

> RevokeOAuth2LoginSessions(ctx).Subject(subject).Execute()
> RevokeOAuth2LoginSessions(ctx).Subject(subject).Sid(sid).Execute()
Revokes All OAuth 2.0 Login Sessions of a Subject
Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID



Expand All @@ -1619,11 +1619,12 @@ import (
)

func main() {
subject := "subject_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for.
subject := "subject_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional)
sid := "sid_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OAuth2Api.RevokeOAuth2LoginSessions(context.Background()).Subject(subject).Execute()
resp, r, err := apiClient.OAuth2Api.RevokeOAuth2LoginSessions(context.Background()).Subject(subject).Sid(sid).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OAuth2Api.RevokeOAuth2LoginSessions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand All @@ -1643,6 +1644,7 @@ Other parameters are passed through a pointer to a apiRevokeOAuth2LoginSessionsR
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**subject** | **string** | OAuth 2.0 Subject The subject to revoke authentication sessions for. |
**sid** | **string** | OAuth 2.0 Subject The subject to revoke authentication sessions for. |

### Return type

Expand Down
13 changes: 10 additions & 3 deletions spec/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2844,14 +2844,21 @@
},
"/admin/oauth2/auth/sessions/login": {
"delete": {
"description": "This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and\ndoes not work with OpenID Connect Front- or Back-channel logout.",
"description": "This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.\n\nIf you send the subject in a query param, all authentication sessions that belong to that subject are revoked.\nNo OpennID Connect Front- or Back-channel logout is performed in this case.\n\nAlternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected\nto that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.",
"operationId": "revokeOAuth2LoginSessions",
"parameters": [
{
"description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.",
"in": "query",
"name": "subject",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.",
"in": "query",
"name": "sid",
"schema": {
"type": "string"
}
Expand All @@ -2872,7 +2879,7 @@
"description": "errorOAuth2"
}
},
"summary": "Revokes All OAuth 2.0 Login Sessions of a Subject",
"summary": "Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID",
"tags": [
"oAuth2"
]
Expand Down
13 changes: 9 additions & 4 deletions spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@
},
"/admin/oauth2/auth/sessions/login": {
"delete": {
"description": "This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and\ndoes not work with OpenID Connect Front- or Back-channel logout.",
"description": "This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.\n\nIf you send the subject in a query param, all authentication sessions that belong to that subject are revoked.\nNo OpennID Connect Front- or Back-channel logout is performed in this case.\n\nAlternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected\nto that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.",
"consumes": [
"application/json"
],
Expand All @@ -1294,15 +1294,20 @@
"tags": [
"oAuth2"
],
"summary": "Revokes All OAuth 2.0 Login Sessions of a Subject",
"summary": "Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID",
"operationId": "revokeOAuth2LoginSessions",
"parameters": [
{
"type": "string",
"description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.",
"name": "subject",
"in": "query",
"required": true
"in": "query"
},
{
"type": "string",
"description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.",
"name": "sid",
"in": "query"
}
],
"responses": {
Expand Down

0 comments on commit a329aff

Please sign in to comment.