Examples of SSOContext


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();                
            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();                
            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();                
            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_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

    // 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, credential.getValue());
   
    return context;
  }
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOContext

            String fullpath = remotePrincipal.getFullPath();
            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

                ds.setDriverClassName(prefs.getValue("SSOJdbcDriver", ""));
                ds.setUrl(prefs.getValue("SSOJdbcConnection", ""))
                String ssoURL = prefs.getValue("SSOSite", "");
               
                // SSO API lookup
                SSOContext credentials = null;
                try
                {
                    if (sso == null)
                        throw new SSOException("SSO Not supported.");
                   
                    credentials = sso.getCredentials(getSubject(), ssoURL);
                }
                catch(SSOException ssoex)
                {
                    throw new Exception("SSO credential lookup failed. Error: " + ssoex.getMessage());
                }
               
                String ssoUserName = credentials.getRemotePrincipalName();
                String ssoPWD = credentials.getRemoteCredential();
                ds.setUsername(ssoUserName);
                ds.setPassword( ssoPWD );
                con = ds.getConnection();
            }
            else
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.