Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: selfservice/admin session management #2011

Merged
merged 21 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/docs/guides/login-session.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,9 @@ $ curl -s -X POST -H "Accept: application/json" \
}
}
```

## Revoke Sessions using Self-Service

## List Sessions using Self-Service

## List and Revoke Sessions as an Administrator
zepatrik marked this conversation as resolved.
Show resolved Hide resolved
19 changes: 1 addition & 18 deletions identity/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,7 @@ type identityList []Identity
// swagger:parameters adminListIdentities
// nolint:deadcode,unused
type adminListIdentities struct {
// Items per Page
//
// This is the number of items per page.
//
// required: false
// in: query
// default: 100
// min: 1
// max: 500
PerPage int `json:"per_page"`

// Pagination Page
//
// required: false
// in: query
// default: 0
// min: 0
Page int `json:"page"`
x.PaginationParams
}

// swagger:route GET /identities v0alpha2 adminListIdentities
Expand Down
4 changes: 4 additions & 0 deletions internal/httpclient/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ docs/InlineResponse503.md
docs/JsonError.md
docs/MetadataApi.md
docs/NeedsPrivilegedSessionError.md
docs/Pagination.md
docs/RecoveryAddress.md
docs/RevokedSessions.md
docs/SelfServiceBrowserLocationChangeRequiredError.md
docs/SelfServiceError.md
docs/SelfServiceFlowExpiredError.md
Expand Down Expand Up @@ -101,7 +103,9 @@ model_inline_response_200_1.go
model_inline_response_503.go
model_json_error.go
model_needs_privileged_session_error.go
model_pagination.go
model_recovery_address.go
model_revoked_sessions.go
model_self_service_browser_location_change_required_error.go
model_self_service_error.go
model_self_service_flow_expired_error.go
Expand Down
8 changes: 7 additions & 1 deletion internal/httpclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ technology capable of authorizing incoming requests.
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: v0.8.0-alpha.2.pre.1
- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen

Expand Down Expand Up @@ -92,6 +92,7 @@ Class | Method | HTTP request | Description
*V0alpha2Api* | [**AdminDeleteIdentitySessions**](docs/V0alpha2Api.md#admindeleteidentitysessions) | **Delete** /identities/{id}/sessions | Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
*V0alpha2Api* | [**AdminGetIdentity**](docs/V0alpha2Api.md#admingetidentity) | **Get** /identities/{id} | Get an Identity
*V0alpha2Api* | [**AdminListIdentities**](docs/V0alpha2Api.md#adminlistidentities) | **Get** /identities | List Identities
*V0alpha2Api* | [**AdminListIdentitySessions**](docs/V0alpha2Api.md#adminlistidentitysessions) | **Get** /identities/{id}/sessions | This endpoint returns all sessions that belong to the given Identity.
*V0alpha2Api* | [**AdminUpdateIdentity**](docs/V0alpha2Api.md#adminupdateidentity) | **Put** /identities/{id} | Update an Identity
*V0alpha2Api* | [**CreateSelfServiceLogoutFlowUrlForBrowsers**](docs/V0alpha2Api.md#createselfservicelogoutflowurlforbrowsers) | **Get** /self-service/logout/browser | Create a Logout URL for Browsers
*V0alpha2Api* | [**GetJsonSchema**](docs/V0alpha2Api.md#getjsonschema) | **Get** /schemas/{id} |
Expand All @@ -113,6 +114,9 @@ Class | Method | HTTP request | Description
*V0alpha2Api* | [**InitializeSelfServiceVerificationFlowForBrowsers**](docs/V0alpha2Api.md#initializeselfserviceverificationflowforbrowsers) | **Get** /self-service/verification/browser | Initialize Verification Flow for Browser Clients
*V0alpha2Api* | [**InitializeSelfServiceVerificationFlowWithoutBrowser**](docs/V0alpha2Api.md#initializeselfserviceverificationflowwithoutbrowser) | **Get** /self-service/verification/api | Initialize Verification Flow for APIs, Services, Apps, ...
*V0alpha2Api* | [**ListIdentitySchemas**](docs/V0alpha2Api.md#listidentityschemas) | **Get** /schemas |
*V0alpha2Api* | [**ListSessions**](docs/V0alpha2Api.md#listsessions) | **Get** /sessions | This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint.
*V0alpha2Api* | [**RevokeSession**](docs/V0alpha2Api.md#revokesession) | **Delete** /sessions/{id} | Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted.
*V0alpha2Api* | [**RevokeSessions**](docs/V0alpha2Api.md#revokesessions) | **Delete** /sessions | Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted.
*V0alpha2Api* | [**SubmitSelfServiceLoginFlow**](docs/V0alpha2Api.md#submitselfserviceloginflow) | **Post** /self-service/login | Submit a Login Flow
*V0alpha2Api* | [**SubmitSelfServiceLogoutFlow**](docs/V0alpha2Api.md#submitselfservicelogoutflow) | **Get** /self-service/logout | Complete Self-Service Logout
*V0alpha2Api* | [**SubmitSelfServiceLogoutFlowWithoutBrowser**](docs/V0alpha2Api.md#submitselfservicelogoutflowwithoutbrowser) | **Delete** /self-service/logout/api | Perform Logout for APIs, Services, Apps, ...
Expand Down Expand Up @@ -143,7 +147,9 @@ Class | Method | HTTP request | Description
- [InlineResponse503](docs/InlineResponse503.md)
- [JsonError](docs/JsonError.md)
- [NeedsPrivilegedSessionError](docs/NeedsPrivilegedSessionError.md)
- [Pagination](docs/Pagination.md)
- [RecoveryAddress](docs/RecoveryAddress.md)
- [RevokedSessions](docs/RevokedSessions.md)
- [SelfServiceBrowserLocationChangeRequiredError](docs/SelfServiceBrowserLocationChangeRequiredError.md)
- [SelfServiceError](docs/SelfServiceError.md)
- [SelfServiceFlowExpiredError](docs/SelfServiceFlowExpiredError.md)
Expand Down
Loading