Examples of SSOContext


Examples of org.apache.jetspeed.sso.SSOContext

    {
        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))
            {
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

        }
       
        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))
            {
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

        try
        {
            Subject subject = getSubject();
            if (sso.hasSSOCredentials(subject, site))
            {
              SSOContext context = sso.getCredentials(subject, site);
              if (!context.getRemotePrincipalName().equals(ssoPrincipal))
              {
                sso.removeCredentialsForSite(subject, site);
                sso.addCredentialsForSite(subject, ssoPrincipal, site, ssoCredential);
              }
              else
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

            try
            {
                Subject subject = getSubject();
                if (sso.hasSSOCredentials(subject, site))
                {
                    SSOContext context = sso.getCredentials(subject, site);
                    if (!context.getRemotePrincipalName().equals(ssoPrincipal))
                    {
                        sso.removeCredentialsForSite(subject, site);
                        sso.addCredentialsForSite(subject, ssoPrincipal, site, ssoCredential);
                    }
                    else
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

            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))
            {
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

    {
        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))
            {
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

    // 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;
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

    }
   
    //  Create new context
    String name = stripPrincipalName(remotePrincipal.getFullPath());
   
    SSOContext context = new SSOContextImpl(credential.getPrincipalId(), name, this.unscramble(credential.getValue()));
   
    return context;
  }
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

            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);
            }
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

    // 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;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.