Package org.apache.jetspeed.sso

Examples of org.apache.jetspeed.sso.SSOUser


            Subject subject = JSSubject.getSubject(AccessController.getContext());
            Collection<SSOUser> remoteUsers = sso.getRemoteUsers(site, subject);
           
            if (remoteUsers != null && !remoteUsers.isEmpty())
            {
                SSOUser ssoUser = remoteUsers.iterator().next();
               
                if (!StringUtils.equals(ssoUser.getName(), username))
                {
                    ssoUser.setName(username);
                    sso.updateUser(ssoUser);
                }
               
                sso.setPassword(ssoUser, password);
            }
View Full Code Here


        SSOSite site = sso.getSiteByUrl(siteUrl);
        if (site != null)
        {
            try
            {
                SSOUser remoteUser = SSOPortletUtil.getRemoteUser(sso, request, site);
                if (remoteUser != null)
                {
                    PasswordCredential pwc = sso.getCredentials(remoteUser);
                    getContext(request).put(SSO_FORM_PRINCIPAL, pwc.getUserName());
                    getContext(request).put(SSO_FORM_CREDENTIAL, pwc.getPassword());
View Full Code Here

            response.getWriter().print(SSOWebContentPortlet.NO_CREDENTIALS);
            return;
        }
        try
        {
            SSOUser remoteUser = SSOPortletUtil.getRemoteUser(sso, request, site);
            if (remoteUser != null)
            {
                PasswordCredential pwc = sso.getCredentials(remoteUser);
                request.setAttribute(SSO_REQUEST_ATTRIBUTE_USERNAME, pwc.getUserName());
                request.setAttribute(SSO_REQUEST_ATTRIBUTE_PASSWORD, pwc.getPassword());
View Full Code Here

        return null;
    }
   
    public static void updateUser(SSOManager sso, PortletRequest request, SSOSite site, String newPrincipal, String newPassword) throws SSOException
    {
        SSOUser remoteUser = getRemoteUser(sso, request, site);
        if (remoteUser != null)
        {
            if (!remoteUser.getName().equals(newPrincipal))
            {
                // rename SSO user and update
                remoteUser.setName(newPrincipal);
                sso.updateUser(remoteUser);
            }
            sso.setPassword(remoteUser, newPassword);
        }
        else
View Full Code Here

    public static PasswordCredential getCredentialsForSite(SSOManager sso, SSOSite site, RenderRequest request)
    {
        PasswordCredential pwc = null;
        try
        {
            SSOUser remoteUser = getRemoteUser(sso, request, site);
            if (remoteUser != null)
            {
                pwc = sso.getCredentials(remoteUser);
            }
View Full Code Here

                Collection<SSOUser> remoteUsers = sso.getRemoteUsers(site,getSubject());
                if (remoteUsers.size() > 0)
                {
                    // TODO: in case of multiple users, invent a way to choose one of them
                    //   right now, simply the first SSO user is selected
                    SSOUser remoteUser = remoteUsers.iterator().next();
                    SSOClient client = sso.getClient(site, remoteUser);
                    if (client == null)
                    {
                        response.getWriter().println("<P>Could not create client for site with name " + ssoSite + " and user "+request.getUserPrincipal().getName()+"</P>");
                        return;
View Full Code Here

        SSOSite site = sso.getSiteByUrl(siteUrl);
        if (site != null)
        {
            try
            {
                SSOUser remoteUser = SSOPortletUtil.getRemoteUser(sso, request, site);
                if (remoteUser != null)
                {
                    PasswordCredential pwc = sso.getCredentials(remoteUser);
                    getContext(request).put(SSO_FORM_PRINCIPAL, pwc.getUserName());
                    getContext(request).put(SSO_FORM_CREDENTIAL, pwc.getPassword());
View Full Code Here

            response.getWriter().print(SSOWebContentPortlet.NO_CREDENTIALS);
            return;
        }
        try
        {
            SSOUser remoteUser = SSOPortletUtil.getRemoteUser(sso, request, site);
            if (remoteUser != null)
            {
                PasswordCredential pwc = sso.getCredentials(remoteUser);
                request.setAttribute(SSO_REQUEST_ATTRIBUTE_USERNAME, pwc.getUserName());
                request.setAttribute(SSO_REQUEST_ATTRIBUTE_PASSWORD, pwc.getPassword());
View Full Code Here

        SSOSite site = sso.getSiteByUrl(siteUrl);
        if (site != null)
        {
            try
            {
                SSOUser remoteUser = SSOPortletUtil.getRemoteUser(sso, request, site);
                if (remoteUser != null)
                {
                    PasswordCredential pwc = sso.getCredentials(remoteUser);
                    getContext(request).put(SSO_FORM_PRINCIPAL, pwc.getUserName());
                    getContext(request).put(SSO_FORM_CREDENTIAL, pwc.getPassword());
View Full Code Here

            response.getWriter().print(SSOWebContentPortlet.NO_CREDENTIALS);
            return;
        }
        try
        {
            SSOUser remoteUser = SSOPortletUtil.getRemoteUser(sso, request, site);
            if (remoteUser != null)
            {
                PasswordCredential pwc = sso.getCredentials(remoteUser);
                request.setAttribute(SSO_REQUEST_ATTRIBUTE_USERNAME, pwc.getUserName());
                request.setAttribute(SSO_REQUEST_ATTRIBUTE_PASSWORD, pwc.getPassword());
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.sso.SSOUser

Copyright © 2018 www.massapicom. 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.