feat: end-user log out (#1356)

This commit is contained in:
Yaodong Yu
2023-01-17 22:57:05 +08:00
committed by GitHub
parent 0021226a60
commit 5d9b17542f
20 changed files with 816 additions and 201 deletions

View File

@ -177,6 +177,24 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/add-record:
post:
tags:
- Record API
description: add a record
operationId: ApiController.AddRecord
parameters:
- in: body
name: body
description: The details of the record
required: true
schema:
$ref: '#/definitions/object.Record'
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/add-resource:
post:
tags:
@ -277,6 +295,11 @@ paths:
tags:
- Login API
operationId: ApiController.GetCaptcha
/api/api/get-webhook-event:
get:
tags:
- GetWebhookEventType API
operationId: ApiController.GetWebhookEventType
/api/api/reset-email-or-phone:
post:
tags:
@ -338,6 +361,11 @@ paths:
description: object
schema:
$ref: '#/definitions/Response'
/api/api/webhook:
post:
tags:
- HandleOfficialAccountEvent API
operationId: ApiController.HandleOfficialAccountEvent
/api/buy-product:
post:
tags:
@ -542,6 +570,25 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/delete-session:
post:
tags:
- Session API
description: Delete session by userId
operationId: ApiController.DeleteSession
parameters:
- in: query
name: ID
description: The ID(owner/name) of user.
required: true
type: string
responses:
"200":
description: The Response object
schema:
type: array
items:
type: string
/api/delete-syncer:
post:
tags:
@ -734,6 +781,23 @@ paths:
type: array
items:
$ref: '#/definitions/object.Cert'
/api/get-default-application:
get:
tags:
- Organization API
description: get default application
operationId: ApiController.GetDefaultApplication
parameters:
- in: query
name: id
description: organization id
required: true
type: string
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/Response'
/api/get-email-and-phone:
post:
tags:
@ -756,6 +820,19 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/get-global-providers:
get:
tags:
- Provider API
description: get Global providers
operationId: ApiController.GetGlobalProviders
responses:
"200":
description: The Response object
schema:
type: array
items:
$ref: '#/definitions/object.Provider'
/api/get-global-users:
get:
tags:
@ -947,6 +1024,38 @@ paths:
type: array
items:
$ref: '#/definitions/object.Permission'
/api/get-permissions-by-role:
get:
tags:
- Permission API
description: get permissions by role
operationId: ApiController.GetPermissionsByRole
parameters:
- in: query
name: id
description: The id of the role
required: true
type: string
responses:
"200":
description: The Response object
schema:
type: array
items:
$ref: '#/definitions/object.Permission'
/api/get-permissions-by-submitter:
get:
tags:
- Permission API
description: get permissions by submitter
operationId: ApiController.GetPermissionsBySubmitter
responses:
"200":
description: The Response object
schema:
type: array
items:
$ref: '#/definitions/object.Permission'
/api/get-product:
get:
tags:
@ -1060,6 +1169,15 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/object.Record'
/api/get-release:
get:
tags:
- System API
description: get local github repo's latest release version info
operationId: ApiController.GitRepoVersion
responses:
"200":
description: '{string} local latest version hash of casdoor'
/api/get-resource:
get:
tags:
@ -1106,6 +1224,25 @@ paths:
type: array
items:
$ref: '#/definitions/object.Role'
/api/get-sessions:
get:
tags:
- Session API
description: Get organization user sessions
operationId: ApiController.GetSessions
parameters:
- in: query
name: owner
description: The organization name
required: true
type: string
responses:
"200":
description: The Response object
schema:
type: array
items:
type: string
/api/get-sorted-users:
get:
tags:
@ -1170,6 +1307,23 @@ paths:
type: array
items:
$ref: '#/definitions/object.Syncer'
/api/get-system-info:
get:
tags:
- System API
description: get user's system info
operationId: ApiController.GetSystemInfo
parameters:
- in: query
name: id
description: The id of the user
required: true
type: string
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/object.SystemInfo'
/api/get-token:
get:
tags:
@ -1544,32 +1698,6 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/object.TokenError'
/api/login/oauth/logout:
get:
tags:
- Token API
description: delete token by AccessToken
operationId: ApiController.TokenLogout
parameters:
- in: query
name: id_token_hint
description: id_token_hint
required: true
type: string
- in: query
name: post_logout_redirect_uri
description: post_logout_redirect_uri
type: string
- in: query
name: state
description: state
required: true
type: string
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/login/oauth/refresh_token:
post:
tags:
@ -1620,6 +1748,19 @@ paths:
- Login API
description: logout the current user
operationId: ApiController.Logout
parameters:
- in: query
name: id_token_hint
description: id_token_hint
type: string
- in: query
name: post_logout_redirect_uri
description: post_logout_redirect_uri
type: string
- in: query
name: state
description: state
type: string
responses:
"200":
description: The Response object
@ -1630,6 +1771,19 @@ paths:
- Login API
description: logout the current user
operationId: ApiController.Logout
parameters:
- in: query
name: id_token_hint
description: id_token_hint
type: string
- in: query
name: post_logout_redirect_uri
description: post_logout_redirect_uri
type: string
- in: query
name: state
description: state
type: string
responses:
"200":
description: The Response object
@ -2139,10 +2293,10 @@ paths:
schema:
$ref: '#/definitions/Response'
definitions:
2200.0xc0003f8480.false:
2268.0xc0000f9650.false:
title: "false"
type: object
2235.0xc0003f84b0.false:
2302.0xc0000f9680.false:
title: "false"
type: object
Response:
@ -2174,6 +2328,12 @@ definitions:
type: string
autoSignin:
type: boolean
captchaToken:
type: string
captchaType:
type: string
clientSecret:
type: string
code:
type: string
email:
@ -2223,9 +2383,9 @@ definitions:
type: object
properties:
data:
$ref: '#/definitions/2200.0xc0003f8480.false'
$ref: '#/definitions/2268.0xc0000f9650.false'
data2:
$ref: '#/definitions/2235.0xc0003f84b0.false'
$ref: '#/definitions/2302.0xc0000f9680.false'
msg:
type: string
name:
@ -2291,8 +2451,12 @@ definitions:
type: string
displayName:
type: string
enableAutoSignin:
type: boolean
enableCodeSignin:
type: boolean
enableLinkWithEmail:
type: boolean
enablePassword:
type: boolean
enableSamlCompress:
@ -2308,6 +2472,15 @@ definitions:
format: int64
forgetUrl:
type: string
formBackgroundUrl:
type: string
formCss:
type: string
formOffset:
type: integer
format: int64
formSideHtml:
type: string
grantTypes:
type: array
items:
@ -2335,6 +2508,8 @@ definitions:
refreshExpireInHours:
type: integer
format: int64
samlReplyUrl:
type: string
signinHtml:
type: string
signinUrl:
@ -2424,6 +2599,18 @@ definitions:
type: string
username:
type: string
object.ManagedAccount:
title: ManagedAccount
type: object
properties:
application:
type: string
password:
type: string
signinUrl:
type: string
username:
type: string
object.Model:
title: Model
type: object
@ -2450,6 +2637,8 @@ definitions:
type: array
items:
type: string
end_session_endpoint:
type: string
grant_types_supported:
type: array
items:
@ -2500,6 +2689,8 @@ definitions:
$ref: '#/definitions/object.AccountItem'
createdTime:
type: string
defaultApplication:
type: string
defaultAvatar:
type: string
displayName:
@ -2508,8 +2699,15 @@ definitions:
type: boolean
favicon:
type: string
initScore:
type: integer
format: int64
isProfilePublic:
type: boolean
languages:
type: array
items:
type: string
masterPassword:
type: string
name:
@ -2595,10 +2793,20 @@ definitions:
type: array
items:
type: string
adapter:
type: string
approveTime:
type: string
approver:
type: string
createdTime:
type: string
displayName:
type: string
domains:
type: array
items:
type: string
effect:
type: string
isEnabled:
@ -2619,6 +2827,10 @@ definitions:
type: array
items:
type: string
state:
type: string
submitter:
type: string
users:
type: array
items:
@ -2631,6 +2843,8 @@ definitions:
type: string
currency:
type: string
description:
type: string
detail:
type: string
displayName:
@ -2644,6 +2858,10 @@ definitions:
price:
type: number
format: double
providerObjs:
type: array
items:
$ref: '#/definitions/object.Provider'
providers:
type: array
items:
@ -2694,6 +2912,8 @@ definitions:
type: string
customUserInfoUrl:
type: string
disableSsl:
type: boolean
displayName:
type: string
domain:
@ -2718,11 +2938,15 @@ definitions:
type: string
owner:
type: string
pathPrefix:
type: string
port:
type: integer
format: int64
providerUrl:
type: string
receiver:
type: string
regionId:
type: string
signName:
@ -2749,10 +2973,14 @@ definitions:
type: boolean
name:
type: string
owner:
type: string
prompted:
type: boolean
provider:
$ref: '#/definitions/object.Provider'
rule:
type: string
object.Record:
title: Record
type: object
@ -2790,6 +3018,10 @@ definitions:
type: string
displayName:
type: string
domains:
type: array
items:
type: string
isEnabled:
type: boolean
name:
@ -2864,6 +3096,9 @@ definitions:
type: string
user:
type: string
object.SystemInfo:
title: SystemInfo
type: object
object.TableColumn:
title: TableColumn
type: object
@ -3040,12 +3275,20 @@ definitions:
type: string
lastSigninTime:
type: string
lastSigninWrongTime:
type: string
ldap:
type: string
line:
type: string
linkedin:
type: string
location:
type: string
managedAccounts:
type: array
items:
$ref: '#/definitions/object.ManagedAccount'
name:
type: string
okta:
@ -3083,6 +3326,9 @@ definitions:
score:
type: integer
format: int64
signinWrongTimes:
type: integer
format: int64
signupApplication:
type: string
slack:
@ -3095,8 +3341,6 @@ definitions:
type: string
type:
type: string
unionId:
type: string
updatedTime:
type: string
webauthnCredentials: