mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
feat: add casdoor as itself idp support (#578)
Signed-off-by: Steve0x2a <stevesough@gmail.com>
This commit is contained in:
@ -478,6 +478,39 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/buy-product": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Product API"
|
||||
],
|
||||
"description": "buy product",
|
||||
"operationId": "ApiController.BuyProduct",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "id",
|
||||
"description": "The id of the product",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "providerName",
|
||||
"description": "The name of the provider",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The Response object",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/check-ldap-users-exist": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@ -1710,6 +1743,49 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/get-user-payments": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Payment API"
|
||||
],
|
||||
"description": "get payments for a user",
|
||||
"operationId": "ApiController.GetUserPayments",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "owner",
|
||||
"description": "The owner of payments",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "organization",
|
||||
"description": "The organization of the user",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "user",
|
||||
"description": "The username of the user",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The Response object",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/object.Payment"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/get-users": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@ -1936,6 +2012,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/login/oauth/introspect": {
|
||||
"post": {
|
||||
"description": "The introspection endpoint is an OAuth 2.0 endpoint that takes a",
|
||||
"operationId": "ApiController.IntrospectToken",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "formData",
|
||||
"name": "token",
|
||||
"description": "access_token's value or refresh_token's value",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "formData",
|
||||
"name": "token_type_hint",
|
||||
"description": "the token type access_token or refresh_token",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The Response object",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/object.IntrospectionResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/login/oauth/logout": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@ -2015,7 +2121,6 @@
|
||||
"in": "query",
|
||||
"name": "client_secret",
|
||||
"description": "OAuth client secret",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
@ -2046,6 +2151,34 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/notify-payment": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Payment API"
|
||||
],
|
||||
"description": "notify payment",
|
||||
"operationId": "ApiController.NotifyPayment",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "The details of the payment",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/object.Payment"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The Response object",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/send-verification-code": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@ -2664,11 +2797,11 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"2015.0xc0000edb90.false": {
|
||||
"2026.0xc000380de0.false": {
|
||||
"title": "false",
|
||||
"type": "object"
|
||||
},
|
||||
"2049.0xc0000edbc0.false": {
|
||||
"2060.0xc000380e10.false": {
|
||||
"title": "false",
|
||||
"type": "object"
|
||||
},
|
||||
@ -2685,10 +2818,10 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/2015.0xc0000edb90.false"
|
||||
"$ref": "#/definitions/2026.0xc000380de0.false"
|
||||
},
|
||||
"data2": {
|
||||
"$ref": "#/definitions/2049.0xc0000edbc0.false"
|
||||
"$ref": "#/definitions/2060.0xc000380e10.false"
|
||||
},
|
||||
"msg": {
|
||||
"type": "string"
|
||||
@ -2709,10 +2842,10 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/2015.0xc0000edb90.false"
|
||||
"$ref": "#/definitions/2026.0xc000380de0.false"
|
||||
},
|
||||
"data2": {
|
||||
"$ref": "#/definitions/2049.0xc0000edbc0.false"
|
||||
"$ref": "#/definitions/2060.0xc000380e10.false"
|
||||
},
|
||||
"msg": {
|
||||
"type": "string"
|
||||
@ -2864,6 +2997,12 @@
|
||||
"title": "Cert",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorityPublicKey": {
|
||||
"type": "string"
|
||||
},
|
||||
"authorityRootPublicKey": {
|
||||
"type": "string"
|
||||
},
|
||||
"bitSize": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
@ -2913,6 +3052,54 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"object.IntrospectionResponse": {
|
||||
"title": "IntrospectionResponse",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"aud": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"client_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"exp": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"iat": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"iss": {
|
||||
"type": "string"
|
||||
},
|
||||
"jti": {
|
||||
"type": "string"
|
||||
},
|
||||
"nbf": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"scope": {
|
||||
"type": "string"
|
||||
},
|
||||
"sub": {
|
||||
"type": "string"
|
||||
},
|
||||
"token_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"object.Organization": {
|
||||
"title": "Organization",
|
||||
"type": "object",
|
||||
@ -2950,6 +3137,12 @@
|
||||
"phonePrefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"websiteUrl": {
|
||||
"type": "string"
|
||||
}
|
||||
@ -2959,19 +3152,19 @@
|
||||
"title": "Payment",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdTime": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"detail": {
|
||||
"type": "string"
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"good": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
@ -2983,12 +3176,31 @@
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"payUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"price": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"productDisplayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"productName": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"returnUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
@ -3074,8 +3286,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"price": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"providers": {
|
||||
"type": "array",
|
||||
@ -3087,6 +3299,9 @@
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"returnUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"sold": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
@ -3112,6 +3327,9 @@
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"cert": {
|
||||
"type": "string"
|
||||
},
|
||||
"clientId": {
|
||||
"type": "string"
|
||||
},
|
||||
@ -3482,6 +3700,9 @@
|
||||
"birthday": {
|
||||
"type": "string"
|
||||
},
|
||||
"casdoor": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdIp": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -309,6 +309,28 @@ paths:
|
||||
description: object
|
||||
schema:
|
||||
$ref: '#/definitions/Response'
|
||||
/api/buy-product:
|
||||
post:
|
||||
tags:
|
||||
- Product API
|
||||
description: buy product
|
||||
operationId: ApiController.BuyProduct
|
||||
parameters:
|
||||
- in: query
|
||||
name: id
|
||||
description: The id of the product
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: providerName
|
||||
description: The name of the provider
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: The Response object
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.Response'
|
||||
/api/check-ldap-users-exist:
|
||||
post:
|
||||
tags:
|
||||
@ -1111,6 +1133,35 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{int} int The count of filtered users for an organization'
|
||||
/api/get-user-payments:
|
||||
get:
|
||||
tags:
|
||||
- Payment API
|
||||
description: get payments for a user
|
||||
operationId: ApiController.GetUserPayments
|
||||
parameters:
|
||||
- in: query
|
||||
name: owner
|
||||
description: The owner of payments
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: organization
|
||||
description: The organization of the user
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: user
|
||||
description: The username of the user
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: The Response object
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/object.Payment'
|
||||
/api/get-users:
|
||||
get:
|
||||
tags:
|
||||
@ -1262,6 +1313,26 @@ paths:
|
||||
description: The Response object
|
||||
schema:
|
||||
$ref: '#/definitions/object.TokenWrapper'
|
||||
/api/login/oauth/introspect:
|
||||
post:
|
||||
description: The introspection endpoint is an OAuth 2.0 endpoint that takes a
|
||||
operationId: ApiController.IntrospectToken
|
||||
parameters:
|
||||
- in: formData
|
||||
name: token
|
||||
description: access_token's value or refresh_token's value
|
||||
required: true
|
||||
type: string
|
||||
- in: formData
|
||||
name: token_type_hint
|
||||
description: the token type access_token or refresh_token
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: The Response object
|
||||
schema:
|
||||
$ref: '#/definitions/object.IntrospectionResponse'
|
||||
/api/login/oauth/logout:
|
||||
get:
|
||||
tags:
|
||||
@ -1318,7 +1389,6 @@ paths:
|
||||
- in: query
|
||||
name: client_secret
|
||||
description: OAuth client secret
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
@ -1336,6 +1406,24 @@ paths:
|
||||
description: The Response object
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.Response'
|
||||
/api/notify-payment:
|
||||
post:
|
||||
tags:
|
||||
- Payment API
|
||||
description: notify payment
|
||||
operationId: ApiController.NotifyPayment
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: The details of the payment
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/object.Payment'
|
||||
responses:
|
||||
"200":
|
||||
description: The Response object
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.Response'
|
||||
/api/send-verification-code:
|
||||
post:
|
||||
tags:
|
||||
@ -1743,10 +1831,10 @@ paths:
|
||||
schema:
|
||||
$ref: '#/definitions/object.Userinfo'
|
||||
definitions:
|
||||
2015.0xc0000edb90.false:
|
||||
2026.0xc000380de0.false:
|
||||
title: "false"
|
||||
type: object
|
||||
2049.0xc0000edbc0.false:
|
||||
2060.0xc000380e10.false:
|
||||
title: "false"
|
||||
type: object
|
||||
RequestForm:
|
||||
@ -1760,9 +1848,9 @@ definitions:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/definitions/2015.0xc0000edb90.false'
|
||||
$ref: '#/definitions/2026.0xc000380de0.false'
|
||||
data2:
|
||||
$ref: '#/definitions/2049.0xc0000edbc0.false'
|
||||
$ref: '#/definitions/2060.0xc000380e10.false'
|
||||
msg:
|
||||
type: string
|
||||
name:
|
||||
@ -1776,9 +1864,9 @@ definitions:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/definitions/2015.0xc0000edb90.false'
|
||||
$ref: '#/definitions/2026.0xc000380de0.false'
|
||||
data2:
|
||||
$ref: '#/definitions/2049.0xc0000edbc0.false'
|
||||
$ref: '#/definitions/2060.0xc000380e10.false'
|
||||
msg:
|
||||
type: string
|
||||
name:
|
||||
@ -1880,6 +1968,10 @@ definitions:
|
||||
title: Cert
|
||||
type: object
|
||||
properties:
|
||||
authorityPublicKey:
|
||||
type: string
|
||||
authorityRootPublicKey:
|
||||
type: string
|
||||
bitSize:
|
||||
type: integer
|
||||
format: int64
|
||||
@ -1912,6 +2004,39 @@ definitions:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
object.IntrospectionResponse:
|
||||
title: IntrospectionResponse
|
||||
type: object
|
||||
properties:
|
||||
active:
|
||||
type: boolean
|
||||
aud:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
client_id:
|
||||
type: string
|
||||
exp:
|
||||
type: integer
|
||||
format: int64
|
||||
iat:
|
||||
type: integer
|
||||
format: int64
|
||||
iss:
|
||||
type: string
|
||||
jti:
|
||||
type: string
|
||||
nbf:
|
||||
type: integer
|
||||
format: int64
|
||||
scope:
|
||||
type: string
|
||||
sub:
|
||||
type: string
|
||||
token_type:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
object.Organization:
|
||||
title: Organization
|
||||
type: object
|
||||
@ -1938,21 +2063,25 @@ definitions:
|
||||
type: string
|
||||
phonePrefix:
|
||||
type: string
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
websiteUrl:
|
||||
type: string
|
||||
object.Payment:
|
||||
title: Payment
|
||||
type: object
|
||||
properties:
|
||||
amount:
|
||||
type: string
|
||||
createdTime:
|
||||
type: string
|
||||
currency:
|
||||
type: string
|
||||
detail:
|
||||
type: string
|
||||
displayName:
|
||||
type: string
|
||||
good:
|
||||
message:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
@ -1960,10 +2089,23 @@ definitions:
|
||||
type: string
|
||||
owner:
|
||||
type: string
|
||||
payUrl:
|
||||
type: string
|
||||
price:
|
||||
type: number
|
||||
format: double
|
||||
productDisplayName:
|
||||
type: string
|
||||
productName:
|
||||
type: string
|
||||
provider:
|
||||
type: string
|
||||
returnUrl:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
user:
|
||||
@ -2021,8 +2163,8 @@ definitions:
|
||||
owner:
|
||||
type: string
|
||||
price:
|
||||
type: integer
|
||||
format: int64
|
||||
type: number
|
||||
format: double
|
||||
providers:
|
||||
type: array
|
||||
items:
|
||||
@ -2030,6 +2172,8 @@ definitions:
|
||||
quantity:
|
||||
type: integer
|
||||
format: int64
|
||||
returnUrl:
|
||||
type: string
|
||||
sold:
|
||||
type: integer
|
||||
format: int64
|
||||
@ -2047,6 +2191,8 @@ definitions:
|
||||
type: string
|
||||
category:
|
||||
type: string
|
||||
cert:
|
||||
type: string
|
||||
clientId:
|
||||
type: string
|
||||
clientId2:
|
||||
@ -2296,6 +2442,8 @@ definitions:
|
||||
type: string
|
||||
birthday:
|
||||
type: string
|
||||
casdoor:
|
||||
type: string
|
||||
createdIp:
|
||||
type: string
|
||||
createdTime:
|
||||
|
Reference in New Issue
Block a user