mirror of
https://github.com/System-End/slack-morphism-rust.git
synced 2026-04-19 22:05:15 +00:00
Add optional OAuth 2.0 user_scope to redirect url (#330)
* Add OAuth 2.0 `user_scope` to redirect url * Make OAuth field `user_scope` optional
This commit is contained in:
parent
14546c5e0f
commit
236ab3070a
3 changed files with 3 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ impl<H: 'static + Send + Sync + Connect + Clone> SlackEventsAxumListener<H> {
|
|||
&vec![
|
||||
("client_id", Some(config.client_id.value())),
|
||||
("scope", Some(&config.bot_scope)),
|
||||
("user_scope", config.user_scope.as_ref()),
|
||||
(
|
||||
"redirect_uri",
|
||||
Some(config.to_redirect_url()?.as_str().to_string()).as_ref(),
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ impl<H: 'static + Send + Sync + Connect + Clone> SlackClientEventsHyperListener<
|
|||
&vec![
|
||||
("client_id", Some(config.client_id.value())),
|
||||
("scope", Some(&config.bot_scope)),
|
||||
("user_scope", config.user_scope.as_ref()),
|
||||
(
|
||||
"redirect_uri",
|
||||
Some(config.to_redirect_url()?.as_str().to_string()).as_ref(),
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ pub struct SlackOAuthListenerConfig {
|
|||
pub client_id: SlackClientId,
|
||||
pub client_secret: SlackClientSecret,
|
||||
pub bot_scope: String,
|
||||
pub user_scope: Option<String>,
|
||||
pub redirect_callback_host: String,
|
||||
#[default = "SlackOAuthListenerConfig::DEFAULT_INSTALL_PATH_VALUE.into()"]
|
||||
pub install_path: String,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue