Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to logout in my plugin

yeojin_lim October 19, 2021

Hi.

I am trying to force logout when I log in in my plugin. What should I do?

Jira has a LoginManager, is there anything similar to bitbucket?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2021

I think I do not understand the requirement here.

This sentence:

"I am trying to force logout when I log in in my plugin"

reads to me like you want to log the user out when someone starts trying to use your plugin.  This sounds broken to me, because once logged out, they would not be able to use your plugin, as they've logged out of the system the plugin was doing things in.

Could you explain this more to us please?

yeojin_lim October 24, 2021

I mean, I want to log out the logged in user if it is not an admin user.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2021

That would be a bad thing to do to a person trying to use your system, and I cannot work out how that would be useful to anyone.  If someone is not an admin and they land on an admin link, why would you not just tell them "you are not an admin, so yo can't do this" and leave them logged in to continue what they were doing, rather than log them out and stuff up their experience?

yeojin_lim October 24, 2021

I want to log out when accessing an unauthorized page.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2021

That is a horrid thing to do to your people.  Why  not just give them a "you do not have access to this page, but we're not going to throw you out for clicking on something" message?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events