• 大小: 884KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-13
  • 语言: Java
  • 标签: acegi  security  

资源简介

cas-client-java-2.1.1.zip

资源截图

代码片段和文件信息

/*
 *  Copyright (c) 2000-2003 Yale University. All rights reserved.
 *
 *  THIS SOFTWARE IS PROVIDED “AS IS“ AND ANY EXPRESS OR IMPLIED
 *  WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
 *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY
 *  DISCLAIMED. IN NO EVENT SHALL YALE UNIVERSITY OR ITS EMPLOYEES BE
 *  LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR
 *  CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED THE COSTS OF
 *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR
 *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 *  LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 *  SOFTWARE EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH
 *  DAMAGE.
 *
 *  Redistribution and use of this software in source or binary forms
 *  with or without modification are permitted provided that the
 *  following conditions are met:
 *
 *  1. Any redistribution must include the above copyright notice and
 *  disclaimer and this list of conditions in any related documentation
 *  and if feasible in the redistributed software.
 *
 *  2. Any redistribution must include the acknowledgment “This product
 *  includes software developed by Yale University“ in any related
 *  documentation and if feasible in the redistributed software.
 *
 *  3. The names “Yale“ and “Yale University“ must not be used to endorse
 *  or promote products derived from this software.
 */

package edu.yale.its.tp.cas;

import java.io.*;
import java.util.*;
import java.net.*;

/** Utility methods for services that use the central authentication service. */
public class CASServiceUtil {

    private static final boolean debug = false;

    /** The URL for CAS‘s page for primary authentication. */
    public static final String authenticateURL
        = “https://secure.its.yale.edu/cas/servlet/login“;

    /** The URL exposing CAS‘s validation protocol. */
    public static final String validateURL
        = “https://secure.its.yale.edu/cas/servlet/validate“;

    /** The URL which users can visit to destroy CAS credentials. */
    public static final String logoutURL
        = “https://secure.its.yale.edu/cas/servlet/logout“;

    /**
     * Returns the NetID of the owner of the given ticket or null if the
     * ticket isn‘t valid.
     * @param service the service ID for the application validating the
     *        ticket
     * @param ticket the opaque service ticket (ST) to validate
     */
    public static String validate(String service String ticket)
            throws java.io.IOException {
        Properties p = System.getProperties();
        p.put(“java.protocol.handler.pkgs“
            “com.sun.net.ssl.internal.www.protocol“);
        System.setProperties(p);                // < 1.2 compatible
        URL u = new URL(
            validateURL + “?ticket=“ + ticket + “&se

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2004-11-12 19:47  cas-client-java-2.1.1\
     目录           0  2004-11-12 19:43  cas-client-java-2.1.1\dist\
     文件       59817  2004-11-12 19:43  cas-client-java-2.1.1\dist\casclient.jar
     文件          34  2004-09-20 13:00  cas-client-java-2.1.1\.cvsignore
     文件         374  2004-07-13 14:21  cas-client-java-2.1.1\.project
     文件        1062  2004-08-28 22:12  cas-client-java-2.1.1\CONTENTS.txt
     文件        1933  2004-11-11 16:18  cas-client-java-2.1.1\README
     文件        3939  2004-11-09 15:46  cas-client-java-2.1.1\build.xml
     文件         600  2004-08-28 22:14  cas-client-java-2.1.1\index.html
     文件         217  2004-11-11 16:17  cas-client-java-2.1.1\releasetags.txt
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\conf\
     文件        2037  2004-07-13 14:18  cas-client-java-2.1.1\conf\cas.tld
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\examples\
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\examples\proxyLoadBalance\
     文件         504  2004-08-06 18:48  cas-client-java-2.1.1\examples\proxyLoadBalance\index.html
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\examples\proxyLoadBalance\WEB-INF\
     文件        3240  2004-08-06 18:48  cas-client-java-2.1.1\examples\proxyLoadBalance\WEB-INF\web.xml
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\examples\proxyLoadBalance\WEB-INF\lib\
     文件          14  2004-08-18 03:57  cas-client-java-2.1.1\examples\proxyLoadBalance\WEB-INF\lib\.cvsignore
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\legacy\
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\legacy\src\
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\legacy\src\edu\
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\legacy\src\edu\yale\
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\legacy\src\edu\yale\its\
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\legacy\src\edu\yale\its\tp\
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\legacy\src\edu\yale\its\tp\cas\
     文件        3398  2004-07-13 14:19  cas-client-java-2.1.1\legacy\src\edu\yale\its\tp\cas\CASServiceUtil.java
     目录           0  2004-11-12 19:08  cas-client-java-2.1.1\lib\
     文件       22327  2004-07-13 14:20  cas-client-java-2.1.1\lib\commons-logging-api.jar
     文件      121070  2004-07-13 14:20  cas-client-java-2.1.1\lib\junit.jar
     文件      202064  2004-07-13 14:20  cas-client-java-2.1.1\lib\mockrunner.jar
............此处省略294个文件信息

评论

共有 条评论