@Override public UserSession loginTrusted(String login, String password, Locale locale, Map<String, Object> params) throws LoginException { TrustedClientCredentials credentials = new TrustedClientCredentials(login, password, locale, params); copyParamsToCredentials(params, credentials); return authenticationManager.login(credentials).getSession(); }
Locale defaultLocale = availableLocales.values().iterator().next(); TrustedClientCredentials credentials = new TrustedClientCredentials(userLogin, userPassword, defaultLocale);
TrustedClientCredentials credentials = new TrustedClientCredentials(login, config.getTrustedClientPassword(), locale); credentials.setClientType(ClientType.REST_API);
TrustedClientCredentials tcCredentials = new TrustedClientCredentials( externalUserCredentials.getLogin(), webAuthConfig.getTrustedClientPassword(),
sessionInfo.getLocale() : null; TrustedClientCredentials credentials = new TrustedClientCredentials(username, restApiConfig.getTrustedClientPassword(), locale); credentials.setClientType(ClientType.REST_API);
@Override public UserSession loginTrusted(String login, String password, Locale locale, Map<String, Object> params) throws LoginException { checkRemoteClientTrusted(); TrustedClientCredentials credentials = new TrustedClientCredentials(login, password, locale, params); RemoteClientInfo remoteClientInfo = RemoteClientInfo.get(); if (remoteClientInfo != null) { credentials.setClientIpAddress(remoteClientInfo.getAddress()); } else { credentials.setClientIpAddress(null); } copyParamsToCredentials(params, credentials); return authenticationService.login(credentials).getSession(); }
TrustedClientCredentials trustedClientCredentials = new TrustedClientCredentials( systemLogin, webAuthConfig.getTrustedClientPassword(),
TrustedClientCredentials tcCredentials = new TrustedClientCredentials( loginPasswordCredentials.getLogin(), webAuthConfig.getTrustedClientPassword(),
protected UserSession loginAsAnonymous() { String login = portalConfig.getAnonymousUserLogin(); String password = portalConfig.getTrustedClientPassword(); UserSession userSession; try { String portalLocationString = getPortalNetworkLocation(); String portalClientInfo = "Portal Anonymous Session"; if (StringUtils.isNotBlank(portalLocationString)) { portalClientInfo += " (" + portalLocationString + ")"; } TrustedClientCredentials credentials = new TrustedClientCredentials(login, password, messagesTools.getDefaultLocale()); credentials.setClientType(ClientType.PORTAL); credentials.setClientInfo(portalClientInfo); credentials.setParams(ParamsMap.of( ClientType.class.getName(), AppContext.getProperty("cuba.clientType"), SessionParams.CLIENT_INFO.getId(), portalClientInfo )); userSession = authenticationService.login(credentials).getSession(); } catch (LoginException e) { throw new NoMiddlewareConnectionException("Unable to login as anonymous portal user", e); } catch (Exception e) { throw new NoMiddlewareConnectionException("Unable to connect to middleware services", e); } return userSession; }
TrustedClientCredentials credentials = new TrustedClientCredentials( auth.getUsername(), idpConfig.getTrustedClientPassword(),
protected TrustedClientCredentials createTrustedCredentials(LoginPasswordCredentials credentials) { TrustedClientCredentials tcCredentials = new TrustedClientCredentials( credentials.getLogin(), webAuthConfig.getTrustedClientPassword(), credentials.getLocale(), credentials.getParams() ); tcCredentials.setClientInfo(credentials.getClientInfo()); tcCredentials.setClientType(ClientType.WEB); tcCredentials.setIpAddress(credentials.getIpAddress()); tcCredentials.setOverrideLocale(credentials.isOverrideLocale()); tcCredentials.setSyncNewUserSessionReplication(credentials.isSyncNewUserSessionReplication()); tcCredentials.setSessionAttributes(credentials.getSessionAttributes()); return tcCredentials; }
protected TrustedClientCredentials createTrustedCredentials(LoginPasswordCredentials credentials) { TrustedClientCredentials tcCredentials = new TrustedClientCredentials( credentials.getLogin(), portalConfig.getTrustedClientPassword(), credentials.getLocale(), credentials.getParams() ); tcCredentials.setClientInfo(credentials.getClientInfo()); tcCredentials.setClientType(ClientType.PORTAL); tcCredentials.setIpAddress(credentials.getIpAddress()); tcCredentials.setOverrideLocale(credentials.isOverrideLocale()); tcCredentials.setSyncNewUserSessionReplication(credentials.isSyncNewUserSessionReplication()); tcCredentials.setSessionAttributes(credentials.getSessionAttributes()); return tcCredentials; }
protected TrustedClientCredentials createTrustedCredentials(LoginPasswordCredentials credentials) { TrustedClientCredentials tcCredentials = new TrustedClientCredentials( credentials.getLogin(), restApiConfig.getTrustedClientPassword(), credentials.getLocale(), credentials.getParams() ); tcCredentials.setClientInfo(credentials.getClientInfo()); tcCredentials.setClientType(ClientType.REST_API); tcCredentials.setIpAddress(credentials.getIpAddress()); tcCredentials.setOverrideLocale(credentials.isOverrideLocale()); tcCredentials.setSyncNewUserSessionReplication(credentials.isSyncNewUserSessionReplication()); tcCredentials.setSessionAttributes(credentials.getSessionAttributes()); return tcCredentials; }