Hi all

Normally when we want to check whether user is authenticated ivy user or not, we use this api:

Ivy.session().loginSessionUser(userName, password)

But this api will also change the current login user to new one.

Is there any other api to verify user/pass without logout current user?

Because my process is an ivy webservice then it's run with system permission, if i use above api to verify another user it will throw exception that i can't logout of system user.

Thanks

asked 01.02.2018 at 06:00

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%


Hi

You can create a new session. Then, use it to authenticate the user and finally destroy the session again.

See invisible API (API is not visible in content assist but is there and can be used):

ISession session = ivy.wf.getSecurityContext().createSession();
try
{
  session.loginSessionUser(...)
}
finally
{
  ivy.wf.getSecurityContext().destroySesssion(session.getIdentifier());
}
link

answered 01.02.2018 at 06:17

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%

thanks Reto Weiss ♦♦ it's helpful for me

(01.02.2018 at 07:27) trungdv trungdv's gravatar image

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×147
×16

Asked: 01.02.2018 at 06:00

Seen: 1,928 times

Last updated: 01.02.2018 at 07:27