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 at 06:00

trungdv's gravatar image

trungdv
440547290
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 at 06:17

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.2k172450
accept rate: 73%

thanks Reto Weiss ♦♦ it's helpful for me

(01.02 at 07:27) trungdv trungdv's gravatar image
Your answer
toggle preview

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:

×89
×14

Asked: 01.02 at 06:00

Seen: 104 times

Last updated: 01.02 at 07:27