Change login url from `login_redirect` to `login`
This commit is contained in:
parent
bb9d4a28f9
commit
8bb9868b2e
|
@ -10,7 +10,7 @@ security:
|
|||
- jwt: ["secret"]
|
||||
|
||||
paths:
|
||||
/login_redirect:
|
||||
/login:
|
||||
parameters:
|
||||
- name: redirect_url
|
||||
in: query
|
||||
|
@ -57,12 +57,12 @@ paths:
|
|||
operationId: spiffworkflow_backend.routes.user.logout
|
||||
summary: Logout authenticated user
|
||||
tags:
|
||||
- User
|
||||
- Authentication
|
||||
responses:
|
||||
'200':
|
||||
description: Logout Authenticated User
|
||||
|
||||
/api-login:
|
||||
/login_swagger:
|
||||
parameters:
|
||||
- name: uid
|
||||
in: query
|
||||
|
@ -87,7 +87,7 @@ paths:
|
|||
operationId: spiffworkflow_backend.routes.user.api_login
|
||||
summary: Authenticate user for API access
|
||||
tags:
|
||||
- User
|
||||
- Authentication
|
||||
responses:
|
||||
'304':
|
||||
description: Redirection to the hosted frontend with an auth_token header.
|
||||
|
@ -107,6 +107,7 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/OkTrue"
|
||||
|
||||
/process-groups:
|
||||
parameters:
|
||||
- name: page
|
||||
|
@ -754,6 +755,7 @@ paths:
|
|||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Task"
|
||||
|
||||
/process-instance/{process_instance_id}/tasks:
|
||||
parameters:
|
||||
- name: process_instance_id
|
||||
|
@ -780,6 +782,7 @@ paths:
|
|||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Task"
|
||||
|
||||
/tasks/{process_instance_id}/{task_id}:
|
||||
parameters:
|
||||
- name: task_id
|
||||
|
|
|
@ -19,6 +19,11 @@ class UserModel(SpiffworkflowBaseDBModel):
|
|||
"""UserModel."""
|
||||
|
||||
__tablename__ = "user"
|
||||
__table_args__ = (
|
||||
db.UniqueConstraint(
|
||||
"service", "service_id", name="service_key"
|
||||
),
|
||||
)
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
username = db.Column(db.String(50), nullable=False, unique=True)
|
||||
uid = db.Column(db.String(50), unique=True)
|
||||
|
@ -93,9 +98,9 @@ class UserModel(SpiffworkflowBaseDBModel):
|
|||
@classmethod
|
||||
def from_open_id_user_info(cls, user_info):
|
||||
instance = cls()
|
||||
instance.service = 'keycloak',
|
||||
instance.service_id = user_info['sub'],
|
||||
instance.name = user_info['preferred_username'],
|
||||
instance.service = 'keycloak'
|
||||
instance.service_id = user_info['sub']
|
||||
instance.name = user_info['preferred_username']
|
||||
instance.username = user_info['sub']
|
||||
|
||||
return instance
|
||||
|
|
Loading…
Reference in New Issue