This content has been marked as final.
Show 2 replies
-
1. Re: Elytron and EAP 7.1.0 Programattic login
mchoma Feb 20, 2018 4:11 AM (in response to johnnuy)In this case @RunAsrincipal should work, when you are ok with hardcoded username.
There are also 2 programmatic approaches which should also work:
- using Elytron Authentication Context
- securityIdentity.runAs(callable);
-
2. Re: Elytron and EAP 7.1.0 Programattic login
johnnuy Feb 20, 2018 12:01 PM (in response to mchoma)Thanks Martin! Looking at the wildfly/Util.java I was able to get the code I required.
SecurityDomain.getCurrent().authenticate("usr", new PasswordGuessEvidence("pass".toCharArray())).runAs(<runnable>);