@@ -37,6 +37,12 @@ func boolOr(v *bool, def bool) bool {
|
||||
return *v
|
||||
}
|
||||
|
||||
// @Summary 身份提供商列表
|
||||
// @Tags 租户 IAM
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Success 200 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/identity-providers [get]
|
||||
func (h *ociConfigHandler) listIdentityProviders(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -50,6 +56,13 @@ func (h *ociConfigHandler) listIdentityProviders(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, idps)
|
||||
}
|
||||
|
||||
// @Summary 创建身份提供商(SAML)
|
||||
// @Tags 租户 IAM
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Param body body createIdpRequest true "请求体"
|
||||
// @Success 201 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/identity-providers [post]
|
||||
func (h *ociConfigHandler) createIdentityProvider(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -81,6 +94,14 @@ func (h *ociConfigHandler) createIdentityProvider(c *gin.Context) {
|
||||
c.JSON(http.StatusCreated, idp)
|
||||
}
|
||||
|
||||
// @Summary 激活身份提供商
|
||||
// @Tags 租户 IAM
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Param idpId path string true "idpId"
|
||||
// @Param body body object true "请求体(见接口说明)"
|
||||
// @Success 200 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/identity-providers/{idpId}/activate [post]
|
||||
func (h *ociConfigHandler) activateIdentityProvider(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -101,6 +122,13 @@ func (h *ociConfigHandler) activateIdentityProvider(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, idp)
|
||||
}
|
||||
|
||||
// @Summary 删除身份提供商
|
||||
// @Tags 租户 IAM
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Param idpId path string true "idpId"
|
||||
// @Success 204 "无内容"
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/identity-providers/{idpId} [delete]
|
||||
func (h *ociConfigHandler) deleteIdentityProvider(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -113,6 +141,12 @@ func (h *ociConfigHandler) deleteIdentityProvider(c *gin.Context) {
|
||||
c.Status(http.StatusNoContent)
|
||||
}
|
||||
|
||||
// @Summary 下载 SAML 元数据
|
||||
// @Tags 租户 IAM
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Success 200 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/saml-metadata [get]
|
||||
func (h *ociConfigHandler) downloadSamlMetadata(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -127,6 +161,12 @@ func (h *ociConfigHandler) downloadSamlMetadata(c *gin.Context) {
|
||||
c.Data(http.StatusOK, "application/xml", metadata)
|
||||
}
|
||||
|
||||
// @Summary 单点登录规则列表
|
||||
// @Tags 租户 IAM
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Success 200 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/sign-on-rules [get]
|
||||
func (h *ociConfigHandler) listSignOnRules(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -140,6 +180,13 @@ func (h *ociConfigHandler) listSignOnRules(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, rules)
|
||||
}
|
||||
|
||||
// @Summary 创建 MFA 豁免规则
|
||||
// @Tags 租户 IAM
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Param body body object true "请求体(见接口说明)"
|
||||
// @Success 201 {object} map[string]any
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/sign-on-exemptions [post]
|
||||
func (h *ociConfigHandler) createMfaExemption(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
@@ -160,6 +207,13 @@ func (h *ociConfigHandler) createMfaExemption(c *gin.Context) {
|
||||
c.JSON(http.StatusCreated, rule)
|
||||
}
|
||||
|
||||
// @Summary 删除 MFA 豁免规则
|
||||
// @Tags 租户 IAM
|
||||
// @Param id path int true "配置 ID"
|
||||
// @Param ruleId path string true "ruleId"
|
||||
// @Success 204 "无内容"
|
||||
// @Security BearerAuth
|
||||
// @Router /api/v1/oci-configs/{id}/sign-on-exemptions/{ruleId} [delete]
|
||||
func (h *ociConfigHandler) deleteMfaExemption(c *gin.Context) {
|
||||
id, ok := pathID(c)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user