Class SlackMessagingProperties
java.lang.Object
org.apereo.cas.configuration.model.support.slack.SlackMessagingProperties
- All Implemented Interfaces:
Serializable
@RequiresModule(name="cas-server-support-notifications-slack")
public class SlackMessagingProperties
extends Object
implements Serializable
This is
SlackMessagingProperties
.- Since:
- 7.0.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionTo call a Slack Web API method to post messages, CAS needs to be initialized with a Slack API token.The name of the user attribute that would then be used as the slack username.setApiToken
(String apiToken) To call a Slack Web API method to post messages, CAS needs to be initialized with a Slack API token.setUsernameAttribute
(String usernameAttribute) The name of the user attribute that would then be used as the slack username.
-
Constructor Details
-
SlackMessagingProperties
public SlackMessagingProperties()
-
-
Method Details
-
getApiToken
To call a Slack Web API method to post messages, CAS needs to be initialized with a Slack API token. A token usually begins withxoxb-
(bot token) orxoxp-
(user token). You get them from each workspace that an app has been installed. -
getUsernameAttribute
The name of the user attribute that would then be used as the slack username. If the attribute is left blank, the default principal identifier is used. Note that in either case the final value is prefixed with@
, but only if the prefix does not already exist. Multivalued attributes are supported. -
setApiToken
To call a Slack Web API method to post messages, CAS needs to be initialized with a Slack API token. A token usually begins withxoxb-
(bot token) orxoxp-
(user token). You get them from each workspace that an app has been installed.- Returns:
this
.
-
setUsernameAttribute
The name of the user attribute that would then be used as the slack username. If the attribute is left blank, the default principal identifier is used. Note that in either case the final value is prefixed with@
, but only if the prefix does not already exist. Multivalued attributes are supported.- Returns:
this
.
-