Reputation: 21
I need to pass 'Keyword', 'Username' and 'Password' in Slack App in order to trigger a bot that does something (e.g. get all job names from Jenkins and the credentials are the user's on Jenkins server). How can the password be shown on the Slack app screen as asterisks and not as clear text?
I have searched the web and found browser extensions for Slack etc. I do not need a solution for browsers, but only for the app in Mac, Windows, iPhone etc.
when "get something" is the keyword to trigger the bot, then typing username (foo) and password (bar), the actual typing would be:
"get something foo bar"
but the expected characters on screen should be:
"get something foo ***"
I would consider even changing the architecture a bit.
Upvotes: 2
Views: 980
Reputation: 32864
There is no special support for password input in the Slack API.
But to ensure that the password is only visible to the user that enters it you can open a modal
that asks the user for the password. Modals are modal dialog windows that only appear the user that initiated the action.
In full context you could do the following:
/myapp keyword username
Alternatively you can just use a slash command, since its input is not shown to the rest of the channel, e.g. /myapp keyword username password
.
Upvotes: 1