// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
 * Copyright 2022 chyroc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package lark

import (
	"github.com/chyroc/lark/internal"
)

// OpenSSOLogin 打开SSO登录页
//
// 在飞书客户端中打开租户在admin后台配置的SSO登录页
//
// doc: https://open.feishu.cn/document/uAjLw4CM/uYjL24iN/applink-protocol/supported-protocol/open-the-sso-login-page
// new doc: https://open.feishu.cn/document/common-capabilities/applink-protocol/supported-protocol/open-the-sso-login-page
func (r *AppLinkService) OpenSSOLogin(req *OpenSSOLoginReq) string {
	return internal.JoinAppLinkURL("https://applink.feishu.cn/client/passport/sso_login", req)
}

// OpenSSOLoginReq ...
type OpenSSOLoginReq struct {
	SSODomain  string `json:"sso_domain,omitempty"`  // 租户的域名, 填写的是租户在admin后台配置的租户域名信息。当在admin后台改动租户的域名时, 需要同步修改applink该参数值
	TenantName string `json:"tenant_name,omitempty"` // 租户名, 用于在切换租户时, 客户端展示即将登录到的租户名称, 一般填写公司名即可
}
