Represents SSO Remote and Portal principal and credentials
799800801802803804805806807
} // Create new context String name = stripPrincipalName(remotePrincipal.getFullPath()); SSOContext context = new SSOContextImpl(credential.getPrincipalId(), name, this.unscramble(credential.getValue())); return context; }
11591160116111621163116411651166116711681169
InternalUserPrincipal remotePrincipal = (InternalUserPrincipal)principals.next(); Iterator creds = remotePrincipal.getCredentials().iterator(); while (creds.hasNext()) { InternalCredential cred = (InternalCredential) creds.next(); SSOContext context = new SSOContextImpl(remotePrincipal.getPrincipalId(), stripPrincipalName(remotePrincipal.getFullPath()), cred.getValue(), stripPortalPrincipalName(remotePrincipal.getFullPath())); list.add(context); }
186187188189190191192193194195196197198
setupPreferencesEdit(request, response); } else try { Subject subject = getSubject(); SSOContext context = sso.getCredentials(subject, site); request.setAttribute(SSO_REQUEST_ATTRIBUTE_USERNAME, context.getRemotePrincipalName()); request.setAttribute(SSO_REQUEST_ATTRIBUTE_PASSWORD, context.getRemoteCredential()); } catch (SSOException e) { if (e.getMessage().equals(SSOException.NO_CREDENTIALS_FOR_SITE)) {
216217218219220221222223224225226227228
{ try { Subject subject = getSubject(); String site = request.getPreferences().getValue("SRC", ""); SSOContext context = sso.getCredentials(subject, site); getContext(request).put(SSO_EDIT_FIELD_PRINCIPAL, context.getRemotePrincipalName()); getContext(request).put(SSO_EDIT_FIELD_CREDENTIAL, context.getRemoteCredential()); } catch (SSOException e) { if (e.getMessage().equals(SSOException.NO_CREDENTIALS_FOR_SITE)) {
81828384858687888990919293
{ try { Subject subject = getSubject(); String site = request.getPreferences().getValue("SRC", ""); SSOContext context = sso.getCredentials(subject, site); getContext(request).put(SSO_FORM_PRINCIPAL, context.getRemotePrincipalName()); getContext(request).put(SSO_FORM_CREDENTIAL, context.getRemoteCredential()); } catch (SSOException e) { if (e.getMessage().equals(SSOException.NO_CREDENTIALS_FOR_SITE)) {
120121122123124125126127128129130131132
} try { Subject subject = getSubject(); SSOContext context = sso.getCredentials(subject, site); request.setAttribute(SSO_REQUEST_ATTRIBUTE_USERNAME, context.getRemotePrincipalName()); request.setAttribute(SSO_REQUEST_ATTRIBUTE_PASSWORD, context.getRemoteCredential()); } catch (SSOException e) { if (e.getMessage().equals(SSOException.NO_CREDENTIALS_FOR_SITE)) {
437438439440441442443444445446447
// Get the principal from the subject BasePrincipal principal = (BasePrincipal)SecurityHelper.getBestPrincipal(subject, UserPrincipal.class); String fullPath = principal.getFullPath(); // Filter the credentials for the given principals SSOContext context = getCredential(ssoSite, fullPath); if ( context == null) throw new SSOException(SSOException.NO_CREDENTIALS_FOR_SITE); // no entry for site return context;
725726727728729730731732733
10931094109510961097109810991100110111021103
80818283848586878889909192