assertCredentialsMatch(token, info); } else { log.debug("No AuthenticationInfo found for submitted AuthenticationToken [{}]. Returning null.", token);
assertCredentialsMatch(token, info); } else { log.debug("No AuthenticationInfo found for submitted AuthenticationToken [{}]. Returning null.", token);
@Override protected void assertCredentialsMatch(AuthenticationToken authcToken, AuthenticationInfo info) throws AuthenticationException { final LoginAuthenticationInfo kapuaInfo = (LoginAuthenticationInfo) info; super.assertCredentialsMatch(authcToken, info); final Subject currentSubject = SecurityUtils.getSubject(); Session session = currentSubject.getSession(); session.setAttribute("scopeId", kapuaInfo.getUser().getScopeId()); session.setAttribute("userId", kapuaInfo.getUser().getId()); }
@Override protected void assertCredentialsMatch(AuthenticationToken authcToken, AuthenticationInfo info) throws AuthenticationException { final LoginAuthenticationInfo kapuaInfo = (LoginAuthenticationInfo) info; super.assertCredentialsMatch(authcToken, info); final Subject currentSubject = SecurityUtils.getSubject(); Session session = currentSubject.getSession(); session.setAttribute("scopeId", kapuaInfo.getUser().getScopeId()); session.setAttribute("userId", kapuaInfo.getUser().getId()); }
@Override protected void assertCredentialsMatch(AuthenticationToken authcToken, AuthenticationInfo info) throws AuthenticationException { SessionAuthenticationInfo kapuaInfo = (SessionAuthenticationInfo) info; // // Credential match super.assertCredentialsMatch(authcToken, info); // // Set kapua session AccessToken accessToken = kapuaInfo.getAccessToken(); KapuaSession kapuaSession = new KapuaSession(accessToken, accessToken.getScopeId(), accessToken.getUserId()); KapuaSecurityUtils.setSession(kapuaSession); // // Set shiro session Subject currentSubject = SecurityUtils.getSubject(); currentSubject.getSession().setAttribute(KapuaSession.KAPUA_SESSION_KEY, kapuaSession); }
@Override protected void assertCredentialsMatch(AuthenticationToken authcToken, AuthenticationInfo info) throws AuthenticationException { SessionAuthenticationInfo kapuaInfo = (SessionAuthenticationInfo) info; // // Credential match super.assertCredentialsMatch(authcToken, info); // // Set kapua session AccessToken accessToken = kapuaInfo.getAccessToken(); KapuaSession kapuaSession = new KapuaSession(accessToken, accessToken.getScopeId(), accessToken.getUserId()); KapuaSecurityUtils.setSession(kapuaSession); // // Set shiro session Subject currentSubject = SecurityUtils.getSubject(); currentSubject.getSession().setAttribute(KapuaSession.KAPUA_SESSION_KEY, kapuaSession); }
CredentialService credentialService = LOCATOR.getService(CredentialService.class); try { super.assertCredentialsMatch(authcToken, info); } catch (AuthenticationException authenticationEx) { try {
CredentialService credentialService = LOCATOR.getService(CredentialService.class); try { super.assertCredentialsMatch(authcToken, info); } catch (AuthenticationException authenticationEx) { try {
CredentialService credentialService = LOCATOR.getService(CredentialService.class); try { super.assertCredentialsMatch(authcToken, info); } catch (AuthenticationException authenticationEx) { try {
CredentialService credentialService = LOCATOR.getService(CredentialService.class); try { super.assertCredentialsMatch(authcToken, info); } catch (AuthenticationException authenticationEx) { try {