A AuthMS API Wiki API Reference iam.tianv.com →

POST /auth/sso/initiate

根据指定的SSO提供商(SAML或OIDC)生成授权URL与state参数,通过PKCE和CSRF state保护,引导用户跳转至企业身份提供商进行认证。参考:SAML 2.0 Core §3.4、OpenID Connect Core 1.0 §3、RFC 7636 (PKCE)。

身份认证 `bearerAuth` application/json

Request Body

Schema: dto.SSOInitiateRequest

FieldTypeRequiredExampleConstraintsDescription
provider string Yes saml Provider
return_url string No https://app.example.com/callback Return URL
tenant_id string No tenant-001 Tenant ID

Responses

StatusDescriptionSchema
200SSO发起成功,返回授权URL和state参数dto.SSOInitiateResponse
400请求参数无效或不支持的SSO提供商gitee_com_linmes_authms_base_dto.SimpleResponse
401未认证或令牌无效gitee_com_linmes_authms_base_dto.SimpleResponse
500服务器内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.SSOInitiateResponse

SSO登录启动响应

FieldTypeRequiredExampleConstraintsDescription
auth_url string No Authorization URL
provider string No Provider
return_url string No Return URL
state string No State parameter
tenant_id string No Tenant ID

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No