org.apache.catalina.ha.session.SerializablePrincipal的实例源码

项目:class-guard    文件ClusterSingleSignOn.java   
/**
 * Notifies the cluster of the creation of a new SSO entry
 * and register the specified Principal as being associated
 * with the specified value for the single sign on identifier.
 *
 * @param ssoId Single sign on identifier to register
 * @param principal Associated user principal that is identified
 * @param authType Authentication type used to authenticate this
 *  user principal
 * @param username Username used to authenticate this user
 * @param password Password used to authenticate this user
 */
@Override
protected void register(String ssoId,Principal principal,String authType,String username,String password) {

    if (cluster != null && cluster.getMembers().length > 0) {
        messageNumber++;
        SingleSignOnMessage msg =
            new SingleSignOnMessage(cluster.getLocalMember(),ssoId,null);
        msg.setAction(SingleSignOnMessage.REGISTER_SESSION);
        msg.setAuthType(authType);
        msg.setUsername(username);
        msg.setPassword(password);

        SerializablePrincipal sp = null;
        if (principal instanceof GenericPrincipal) {
            sp = SerializablePrincipal.createPrincipal((GenericPrincipal) principal);
            msg.setPrincipal(sp);
        }

        cluster.send(msg);
        if (containerLog.isDebugEnabled())
            containerLog.debug("SingleSignOnMessage Send with action "
                               + msg.getAction());
    }

    registerLocal(ssoId,principal,authType,username,password);

}
项目:class-guard    文件ClusterSingleSignOn.java   
/**
 * Notifies the cluster of an update of the security credentials
 * associated with an SSO session. Updates any <code>SingleSignOnEntry</code>
 * found under key <code>ssoId</code> with the given authentication data.
 * <p>
 * The purpose of this method is to allow an SSO entry that was
 * established without a username/password combination (i.e. established
 * following DIGEST or CLIENT-CERT authentication) to be updated with
 * a username and password if one becomes available through a subsequent
 * BASIC or FORM authentication.  The SSO entry will then be usable for
 * reauthentication.
 * <p>
 * <b>NOTE:</b> Only updates the SSO entry if a call to
 * <code>SingleSignOnEntry.getCanReauthenticate()</code> returns
 * <code>false</code>; otherwise,it is assumed that the SSO entry already
 * has sufficient information to allow reauthentication and that no update
 * is needed.
 *
 * @param ssoId     identifier of Single sign to be updated
 * @param principal the <code>Principal</code> returned by the latest
 *                  call to <code>Realm.authenticate</code>.
 * @param authType  the type of authenticator used (BASIC,CLIENT-CERT,*                  DIGEST or FORM)
 * @param username  the username (if any) used for the authentication
 * @param password  the password (if any) used for the authentication
 */
@Override
protected void update(String ssoId,null);
        msg.setAction(SingleSignOnMessage.UPDATE_SESSION);
        msg.setAuthType(authType);
        msg.setUsername(username);
        msg.setPassword(password);

        SerializablePrincipal sp = null;
        if (principal instanceof GenericPrincipal) {
            sp = SerializablePrincipal.createPrincipal((GenericPrincipal) principal);
            msg.setPrincipal(sp);
        }

        cluster.send(msg);
        if (containerLog.isDebugEnabled())
            containerLog.debug("SingleSignOnMessage Send with action "
                               + msg.getAction());
    }

    updateLocal(ssoId,password);

}
项目:apache-tomcat-7.0.57    文件ClusterSingleSignOn.java   
/**
 * Notifies the cluster of the creation of a new SSO entry
 * and register the specified Principal as being associated
 * with the specified value for the single sign on identifier.
 *
 * @param ssoId Single sign on identifier to register
 * @param principal Associated user principal that is identified
 * @param authType Authentication type used to authenticate this
 *  user principal
 * @param username Username used to authenticate this user
 * @param password Password used to authenticate this user
 */
@Override
protected void register(String ssoId,password);

}
项目:apache-tomcat-7.0.57    文件ClusterSingleSignOn.java   
/**
 * Notifies the cluster of an update of the security credentials
 * associated with an SSO session. Updates any <code>SingleSignOnEntry</code>
 * found under key <code>ssoId</code> with the given authentication data.
 * <p>
 * The purpose of this method is to allow an SSO entry that was
 * established without a username/password combination (i.e. established
 * following DIGEST or CLIENT-CERT authentication) to be updated with
 * a username and password if one becomes available through a subsequent
 * BASIC or FORM authentication.  The SSO entry will then be usable for
 * reauthentication.
 * <p>
 * <b>NOTE:</b> Only updates the SSO entry if a call to
 * <code>SingleSignOnEntry.getCanReauthenticate()</code> returns
 * <code>false</code>; otherwise,password);

}
项目:class-guard    文件SingleSignOnMessage.java   
public SerializablePrincipal getPrincipal() {
    return principal;
}
项目:class-guard    文件SingleSignOnMessage.java   
public void setPrincipal(SerializablePrincipal principal) {
    this.principal = principal;
}
项目:apache-tomcat-7.0.57    文件SingleSignOnMessage.java   
public SerializablePrincipal getPrincipal() {
    return principal;
}
项目:apache-tomcat-7.0.57    文件SingleSignOnMessage.java   
public void setPrincipal(SerializablePrincipal principal) {
    this.principal = principal;
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...