CAS单点登录(第7版)25.通知
如有疑问,请看视频:CAS单点登录(第7版)_在线视频教程-CSDN程序员研修院
1. 通知
1.1. 发送电子邮件
1.1.1. 概述
1.1.1.1. 发送电子邮件
CAS 提供了通过电子邮件通知用户选择操作的功能。示例操作包括有风险的身份验证尝试通知或密码重置链接/令牌等。配置电子邮件提供商(即 Amazon Simple Email Service )是定义 SMTP 设置的问题。在未定义设置的情况下,每个需要电子邮件功能的特定功能都应该能够正常继续。
对电子邮件通知的默认支持由相关模块使用以下模块自动启用/包含:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-core-notifications" } |
您无需在 WAR Overlay 配置中显式包含此模块,除非需要在编译时访问组件和 API。
1.1.1.2. 执行器端点
CAS 提供以下端点:
GET | /cas/actuator/health |
报告由各种监视器生成的系统的一般运行状况。
GET | /cas/actuator/health/{path} |
1.1.1.3. 电子邮件正文
可以使用以下策略构建 CAS 配置中定义的电子邮件正文。
Default
模板文件
Groovy
默认情况下,在 CAS 配置中定义的电子邮件正文使用标记为 ${...} 的变量的特殊占位符进行格式设置。此类变量在运行时替换为正在使用的功能可用的适当值。
1.1.1.4. 电子邮件策略
可以使用以下方法发送电子邮件。
选择 | 参考 |
Default | 请参阅此页面。 |
SendGrid 公司 | 请参阅此页面。 |
Amazon SES | 请参阅此页面。 |
邮喷 | 请参阅此页面。 |
自定义 | 请参阅此页面。 |
1.1.2. 电子邮件策略
1.1.2.1. 默认
1.1.2.1.1. 发送电子邮件 - 默认
默认策略使用 JavaMail API,该 API 提供了一个独立于平台和协议的框架来构建邮件和消息传递应用程序,主要使用 SMTP:
可能还需要定义以下设置来描述邮件服务器设置:
Show entries
搜索:
· spring.mail.default-encoding=UTF-8 默认 MimeMessage 编码。 如何配置此属性? |
· spring.mail.host= SMTP 服务器主机。例如,'smtp.example.com'。 如何配置此属性? |
· spring.mail.jndi-name= 会话 JNDI 名称。设置后,优先于其他 Session 设置。 如何配置此属性? |
· spring.mail.password= SMTP 服务器的登录密码。 如何配置此属性? |
· spring.mail.port= SMTP 服务器端口。 如何配置此属性? |
显示 1 到 5 的 9 个条目
· spring.mail.properties= 其他JavaMail会话属性。 如何配置此属性? |
· spring.mail.protocol=smtp SMTP服务器使用的协议。 如何配置此属性? |
· spring.mail.test-connection=false 是否在启动时测试邮件服务器是否可用。 如何配置此属性? |
· spring.mail.username= SMTP服务器的登录用户。 如何配置此属性? |
上一页12下一页
Showing 6 to 9 of 9 entries
Previous12Next
1.1.2.1.2. 发送电子邮件 - SMTP设置
1.1.2.2. SendGrid公司
1.1.2.2.1. 发送电子邮件 - Twilio SendGrid
您可以指示 CAS 使用 Twilio SendGrid 发送电子邮件。通过包含以下模块来启用支持:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-sendgrid" } |
CAS 配置目录中提供了以下设置和属性:
第三方
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Third Party(第三方)。此标志表示配置设置不受 CAS 生态系统的控制、拥有或管理,并且会影响第三方库(如 Spring Boot 或 Spring Cloud to CAS)提供的功能。有关更多信息,您可能必须访问第三方来源以查找更多详细信息。
Show entries
搜索:
· spring.sendgrid.api-key= SendGrid API 密钥。 org.springframework.boot.autoconfigure.sendgrid.SendGridProperties. 如何配置此属性? |
· spring.sendgrid.proxy.host= SendGrid 代理主机。 org.springframework.boot.autoconfigure.sendgrid.SendGridProperties$Proxy. 如何配置此属性? |
· spring.sendgrid.proxy.port= SendGrid 代理端口。 org.springframework.boot.autoconfigure.sendgrid.SendGridProperties$Proxy. 如何配置此属性? |
显示 1 到 3 个条目中的 3 个
上一页1下一页
1.1.2.3. Amazon SES
1.1.2.3.1. 发送电子邮件 - Amazon Simple Email Service (SES)
您可以指示 CAS 使用 Amazon SES 发送电子邮件。通过包含以下模块来启用支持:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-aws-ses"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.email-provider.ses.credential-access-key= 使用 AWS 提供的访问密钥进行身份验证。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.AmazonSesProperties. 如何配置此属性? |
· cas.email-provider.ses.credential-secret-key= 使用 AWS 提供的密钥进行身份验证。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.AmazonSesProperties. 如何配置此属性? |
· cas.email-provider.ses.endpoint= AWS 自定义终端节点。 org.apereo.cas.configuration.model.support.email.AmazonSesProperties. 如何配置此属性? |
· cas.email-provider.ses.region= 使用的 AWS 区域。 org.apereo.cas.configuration.model.support.email.AmazonSesProperties. 如何配置此属性? |
显示 1 到 4 的 4 个条目
上一页1下一页
1.1.2.4. Mailjet
1.1.2.4.1. 发送电子邮件 - Mailjet
您可以指示 CAS 使用 Mailjet 发送电子邮件。通过包含以下模块来启用支持:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-mailjet"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.email-provider.mailjet.api-key= 用于向 mailjet 服务进行身份验证的 API 密钥。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.MailjetProperties. 如何配置此属性? |
· cas.email-provider.mailjet.bearer-access-token= 用于对 mailjet 服务进行身份验证的不记名访问令牌。主要需要 SMS 集成。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.MailjetProperties. 如何配置此属性? |
· cas.email-provider.mailjet.secret-key= 用于向 mailjet 服务进行身份验证的密钥。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.MailjetProperties. 如何配置此属性? |
显示 1 到 3 个条目中的 3 个
上一页1下一页
1.1.2.5. Mailgun
1.1.2.5.1. 发送电子邮件 - Mailgun
您可以指示 CAS 使用 Mailgun 发送电子邮件。通过包含以下模块来启用支持:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-mailgun"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.email-provider.mailgun.api-key= 用于向服务进行身份验证的 API 密钥。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.MailgunProperties. 如何配置此属性? |
· cas.email-provider.mailgun.base-url=https://api.mailgun.net 服务的基 URL。 对于美国区域 (默认):https://api.mailgun.net 对于欧洲区域: 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.MailgunProperties. 如何配置此属性? |
显示 1 到 2 的 2 个条目
上一页1下一页
1.1.2.6. 自定义
1.1.2.6.1. 发送电子邮件 - 自定义
您可以使用以下 bean 定义和实现 EmailSender 来定义自己的电子邮件发件人,该发件人将负责提交电子邮件等:
1 2 3 4 | @Beanpublic EmailSender emailSender() { return new MyEmailSender(); } |
请参阅本指南,了解有关如何将配置注册到 CAS 运行时的更多信息。
1.2. 发送短信
1.2.1. 概述
1.2.1.1. SMS 消息收发
CAS 提供了通过 SMS 消息收发通知用户所选操作的功能。示例操作包括有风险的身份验证尝试通知或密码重置链接/令牌。下面列出了 CAS 支持的 SMS 提供商。请注意,某些提供商可能需要有效/专业订阅。
对 SMS 通知的默认支持由相关模块使用以下模块自动启用/包含:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-core-notifications"} |
您无需在 WAR Overlay 配置中显式包含此模块,除非需要在编译时访问组件和 API。请参阅下文,了解如何自定义或覆盖特定提供商的默认行为。
供应商 | 参考 |
自定义 | 请参阅本指南。 |
Groovy | 请参阅本指南。 |
REST | 请参阅本指南。 |
特维利奥 | 请参阅本指南。 |
邮喷 | 请参阅本指南。 |
文本魔术 | 请参阅本指南。 |
Clickatell | 请参阅本指南。 |
SmsMode | 请参阅本指南。 |
亚马逊 SNS | 请参阅本指南。 |
Nexmo 公司 | 请参阅本指南。 |
1.2.2. Groovy
1.2.2.1. Groovy SMS 消息收发
使用外部 Groovy 脚本发送文本消息。
1 2 3 4 5 6 7 | import java.util.* def run(Object[] args) { def (from,to,message,logger) = args logger.debug("Sending message ${message} to ${to} from ${from}") true} |
CAS 配置目录中提供了以下设置和属性:
必填
Groovy 脚本
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.groovy.location= 在 CAS 能够自动监视底层资源的更改并动态检测更新和修改的情况和场景中,您可以将以下设置指定为环境变量或系统属性,其值为 false,以禁用资源观察程序: org.apereo.cas.configuration.model.support.sms.GroovySmsProperties. 如何配置此属性? |
显示 1 到 1 的 1 个条目
上一页1下一页
要准备 CAS 以支持 Apache Groovy 并与之集成,请查看本指南。
1.2.3. REST
1.2.3.1. REST SMS 消息收发
使用 RESTful API 发送文本消息。这通常是一个 POST,可以通过下面列出的样式发送到端点。终端节点应显示状态代码 2xx。
查询参数
请求正文
以下请求/查询参数将提交到终端节点 URL:
田 | 描述 |
clientIpAddress | 客户端 IP 地址(如果可用)。 |
serverIpAddress | 服务器 IP 地址(如果可用)。 |
from | 短信的发件人地址。 |
to | 短信的目标收件人。 |
请求正文包含实际消息。
配置
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.rest.url= 用于联系和检索属性的终端节点 URL。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.sms.RestfulSmsProperties. 如何配置此属性? |
显示 1 到 1 的 1 个条目
上一页1下一页
1.2.4. Twilio
1.2.4.1. Twilio 消息和通话
要了解更多信息,请访问此网站。CAS 与 Twilio 集成,通过专用配置设置支持 SMS 消息和电话呼叫。
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-twilio"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.twilio.account-id= 用于身份验证的 Twilio 帐户标识符。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.sms.TwilioProperties. 如何配置此属性? |
· cas.sms-provider.twilio.enabled=true 无论模块是否启用,默认为 true。 org.apereo.cas.configuration.model.support.sms.TwilioProperties. 如何配置此属性? |
· cas.sms-provider.twilio.token= 用于身份验证的 Twilio 密钥令牌。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.sms.TwilioProperties. 如何配置此属性? |
显示 1 到 3 个条目中的 3 个
上一页1下一页
1.2.5. Mailjet
1.2.5.1. Mailjet SMS 消息收发
要了解更多信息,请访问 Mailjet。CAS 与 Mailjet 集成,通过专用配置设置支持 SMS 消息和电话呼叫。
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-mailjet"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
电子邮件服务器
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.mailjet.api-key= 用于向 mailjet 服务进行身份验证的 API 密钥。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.MailjetProperties. 如何配置此属性? |
· cas.sms-provider.mailjet.bearer-access-token= 用于对 mailjet 服务进行身份验证的不记名访问令牌。主要需要 SMS 集成。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.MailjetProperties. 如何配置此属性? |
· cas.sms-provider.mailjet.secret-key= 用于向 mailjet 服务进行身份验证的密钥。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.email.MailjetProperties. 如何配置此属性? |
显示 1 到 3 个条目中的 3 个
上一页1下一页
1.2.6. TextMagic
1.2.6.1. TextMagic 短信
要了解更多信息,请访问此网站。
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-sms-textmagic"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.text-magic.token= 用于建立握手的安全令牌。 org.apereo.cas.configuration.model.support.sms.TextMagicProperties. 如何配置此属性? |
· cas.sms-provider.text-magic.username= 被授权使用该服务作为绑定账户的用户名。 org.apereo.cas.configuration.model.support.sms.TextMagicProperties. 如何配置此属性? |
显示 1 到 2 的 2 个条目
上一页1下一页
1.2.7. Clickatell
1.2.7.1. Clickatell SMS 消息
要了解更多信息,请访问此网站。
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-sms-clickatell"} |
CAS 配置目录中提供了以下设置和属性:
必填
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.clickatell.server-url=https://platform.clickatell.com/messages 用于联系和发送消息的 URL。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.sms.ClickatellProperties. 如何配置此属性? |
· cas.sms-provider.clickatell.token= 用于与服务建立握手的安全令牌。 org.apereo.cas.configuration.model.support.sms.ClickatellProperties. 如何配置此属性? |
显示 1 到 2 的 2 个条目
上一页1下一页
1.2.8. SmsMode
1.2.8.1. SmsMode SMS 消息收发
要了解更多信息,请访问此网站。
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-sms-smsmode"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.sms-mode.access-token= 用于与服务建立握手的安全令牌。 org.apereo.cas.configuration.model.support.sms.SmsModeProperties. 如何配置此属性? |
· cas.sms-provider.sms-mode.url=https://rest.smsmode.com/sms/v1/messages 用于联系和发送消息的 URL(仅限 POST)。 org.apereo.cas.configuration.model.support.sms.SmsModeProperties. 如何配置此属性? |
显示 1 到 2 的 2 个条目
上一页1下一页
1.2.9. Amazon SNS
1.2.9.1. Amazon SNS SMS 消息收发
要了解更多信息,请访问此网站。
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-sms-aws-sns"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.sns.credential-access-key= 使用 AWS 提供的访问密钥进行身份验证。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.sms.AmazonSnsProperties. 如何配置此属性? |
· cas.sms-provider.sns.credential-secret-key= 使用 AWS 提供的密钥进行身份验证。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.sms.AmazonSnsProperties. 如何配置此属性? |
· cas.sms-provider.sns.endpoint= AWS 自定义终端节点。 org.apereo.cas.configuration.model.support.sms.AmazonSnsProperties. 如何配置此属性? |
· cas.sms-provider.sns.region= 使用的 AWS 区域。 org.apereo.cas.configuration.model.support.sms.AmazonSnsProperties. 如何配置此属性? |
显示 1 到 4 的 4 个条目
上一页1下一页
1.2.10. Nexmo 公司
1.2.10.1. Nexmo 短信
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-sms-nexmo"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.nexmo.api-token= 从 Nexmo 获取的 Nexmo API 令牌。 org.apereo.cas.configuration.model.support.sms.NexmoProperties. 如何配置此属性? |
显示 1 到 1 的 1 个条目
上一页1下一页
1.2.11. 自定义
1.2.11.1. 自定义 SMS 消息收发
使用您自己的自定义实施发送文本消息。
1 2 3 4 | @Beanpublic SmsSender smsSender() { ...} |
要了解有关如何扩展和自定义 CAS 配置的更多信息,请查看本指南。
1.3. 拨打电话
1.3.1. 概述
1.3.1.1. 电话
CAS 提供了通过电话呼叫通知用户所选操作的功能。示例操作包括风险身份验证尝试的通知、多因素身份验证 OTP 或密码重置令牌。下面列出了 CAS 支持的电话运营商。请注意,某些提供商可能需要有效/专业订阅。
对电话呼叫的默认支持由相关模块使用以下模块自动启用/包含:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-core-notifications"} |
您无需在 WAR Overlay 配置中显式包含此模块,除非需要在编译时访问组件和 API。请参阅下文,了解如何自定义或覆盖特定提供商的默认行为。
供应商 | 参考 |
特维利奥 | 请参阅本指南。 |
自定义 | 请参阅本指南。 |
1.3.2. Twilio
1.3.2.1. Twilio 消息和通话
要了解更多信息,请访问此网站。CAS 与 Twilio 集成,通过专用配置设置支持 SMS 消息和电话呼叫。
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-twilio"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.sms-provider.twilio.account-id= 用于身份验证的 Twilio 帐户标识符。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.sms.TwilioProperties. 如何配置此属性? |
· cas.sms-provider.twilio.enabled=true 无论模块是否启用,默认为 true。 org.apereo.cas.configuration.model.support.sms.TwilioProperties. 如何配置此属性? |
· cas.sms-provider.twilio.token= 用于身份验证的 Twilio 密钥令牌。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.sms.TwilioProperties. 如何配置此属性? |
显示 1 到 3 个条目中的 3 个
上一页1下一页
1.3.3. 自定义
电话-自定义运营商
您可以使用以下bean定义并通过实现PhoneCallOperator来定义自己的电话接线员,该接线员的任务是拨打电话等:
1 2 3 4 | @Beanpublic PhoneCallOperator phoneCallOperator() { return new MyPhoneCallOperator();} |
请参阅本指南以了解有关如何将配置注册到CAS运行时的更多信息。
1.4. 发送通知
1.4.1. 概述
1.4.1.1. 通知
CAS 提供了通过特定于平台的通知通知用户和账户有关选定操作的功能。示例操作包括风险身份验证尝试的通知或密码重置链接/令牌或用于多因素身份验证的一次性令牌。下面列出了 CAS 支持的提供商和平台。请注意,某些提供商可能需要有效/专业订阅。
供应商 | 参考 |
谷歌 Firebase | 请参阅本指南。 |
松弛 | 请参阅本指南。 |
自定义 | 请参阅本指南。 |
1.4.2. Google Firebase
1.4.2.1. 通知 - Google Firebase Cloud Messaging
使用以下模块通过相关模块启用支持:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-notifications-fcm"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.google-firebase-messaging.registration-token-attribute-name= 包含用户的注册令牌的主体属性名称。客户端在握手过程中提供的注册令牌应存储在服务器上,并作为主体属性提供给 CAS。 org.apereo.cas.configuration.model.support.firebase.GoogleFirebaseCloudMessagingProperties. 如何配置此属性? |
显示 1 到 1 的 1 个条目
上一页1下一页
1.4.3. Slack
1.4.3.1. 通知 - Slack
使用以下模块通过相关模块启用支持:
Apache Maven
Gradle
BOM - Spring
BOM - Gradle
资源
1 2 3 4 5 6 7 8 9 10 | dependencies { /* The following platform references should be included automatically and are listed here for reference only. implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}") implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) */ implementation "org.apereo.cas:cas-server-support-notifications-slack"} |
CAS 配置目录中提供了以下设置和属性:
必填
自选
笔记
下面列出的配置设置在 CAS 配置元数据中标记为 Required。此标志表示可能需要该设置的存在才能激活或影响 CAS 功能的行为,并且通常应进行审查、可能拥有和调整。如果为该设置分配了默认值,则无需严格将该设置放在配置副本中,但仍应对其进行检查以确保它符合您的部署预期。
Show entries
搜索:
· cas.slack-messaging.api-token= 要调用 Slack Web API 方法发布消息,需要使用 Slack API 令牌初始化 CAS。令牌通常以 xoxb-(机器人令牌)或 xoxp-(用户令牌)开头。您可以从已安装应用程序的每个工作区中获取它们。 此设置支持 Spring 表达式语言。 org.apereo.cas.configuration.model.support.slack.SlackMessagingProperties. 如何配置此属性? |
显示 1 到 1 的 1 个条目
上一页1下一页
1.4.4. 自定义
1.4.4.1. 通知 - 自定义
您可以使用以下 bean 定义并通过实现 NotificationSender 来定义自己的自定义通知发送者:
1 2 3 4 5 6 7 8 9 | @Beanpublic NotificationSenderExecutionPlanConfigurer myNotificationSender( return new NotificationSenderExecutionPlanConfigurer() { @Override public NotificationSender configureNotificationSender() { return new MyNotificationSender(); } };} |
请参阅本指南,了解有关如何将配置注册到 CAS 运行时的更多信息。