亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? authorizationfactory.java

?? 這是學習Java必須讀懂兩套源代碼
?? JAVA
字號:
/**
 * Copyright (C) 2001 Yasna.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        Yasna.com (http://www.yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Yazd" and "Yasna.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact yazd@yasna.com.
 *
 * 5. Products derived from this software may not be called "Yazd",
 *    nor may "Yazd" appear in their name, without prior written
 *    permission of Yasna.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL YASNA.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, 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 OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of Yasna.com. For more information
 * on Yasna.com, please see <http://www.yasna.com>.
 */

/**
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.coolservlets.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@coolservlets.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, 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 OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.coolservlets.com>.
 */

package com.Yasna.forum;

/**
 * An abstract class that defines a framework for providing authorization
 * services in Jive. The static getAuthorization(String,String) and
 * getAnonymousAuthorization() methods should be called directly from
 * applications using Jive in order to obtain Authorization tokens.<p>
 *
 * Users of Jive that wish to change the AuthorizationFactory implementation
 * used to generate tokens can set the <code>AuthorizationFactory.className</code>
 * Jive property. For example, if you have altered Jive to use LDAP for user
 * information, you'd want to write a custom implementation of
 * AuthorizationFactory to make LDAP authorization queries. After changing the
 * <code>AuthorizationFactory.className</code> Jive property, you must restart
 * your application server.
 */
public abstract class AuthorizationFactory {

    /**
     * The default class to instantiate is database implementation.
     */
    private static String className =
        "com.Yasna.forum.database.DbAuthorizationFactory";

    private static AuthorizationFactory factory = null;

    /**
     * Returns the Authorization token associated with the specified username
     * and password. If the username and password do not match the record of
     * any user in the system, the method throws an UnauthorizedException.<p>
     *
     * When using most implementations of this class, authorization tokens
     * should be cached. A convenient place to store a token is often in the
     * HttpSession.
     *
     * @param username the username to create an Authorization with.
     * @param password the password to create an Authorization with.
     * @return an Authorization token if the username and password are correct.
     * @throws UnauthorizedException if the username and password do not match
     *      any existing user.
     */
    public static Authorization getAuthorization(String username,
            String password) throws UnauthorizedException
    {
        loadAuthorizationFactory();
        return factory.createAuthorization(username, password);
    }

    /**
     * Returns the anonymous user Authorization.
     *
     * @return an anonymous Authorization token.
     */
    public static Authorization getAnonymousAuthorization() {
        loadAuthorizationFactory();
        return factory.createAnonymousAuthorization();
    }

    /**
     * Creates Authorization tokens for users. This method is implemented by
     * concrete subclasses of AuthorizationFactory.
     *
     * @param username the username to create an Authorization with.
     * @param password the password to create an Authorization with.
     * @return an Authorization token if the username and password are correct.
     * @throws UnauthorizedException if the username and password do not match
     *      any existing user.
     */
    public abstract Authorization createAuthorization(String username,
            String password) throws UnauthorizedException;

    /**
     * Creates anonymous Authorization tokens. This method is implemented by
     * concrete subclasses AuthorizationFactory.
     *
     * @return an anonymous Authorization token.
     */
    public abstract Authorization createAnonymousAuthorization();

    /**
     * Loads a concrete AuthorizationFactory that can be used generate
     * Authorization tokens for authorized users.<p>
     *
     * By default, the implementation used will be an instance of
     * DbAuthorizationFactory -- the standard database implementation that uses
     * the Jive user table. A different factory can be specified by setting the
     * Jive property "AuthorizationFactory.className". However, you must
     * restart Jive for any change to take effect.
     */
    private static void loadAuthorizationFactory() {
        if (factory == null) {
            //Use className as a convenient object to get a lock on.
            synchronized(className) {
                if (factory == null) {
                    //See if the classname has been set as a Jive property.
                    String classNameProp = PropertyManager.getProperty(
                        "AuthorizationFactory.className"
                    );
                    if (classNameProp != null) {
                        className = classNameProp;
                    }
                    try {
                        Class c = Class.forName(className);
                        factory = (AuthorizationFactory)c.newInstance();
                    }
                    catch (Exception e) {
                        System.err.println("Exception loading class: " + e);
                        e.printStackTrace();
                    }
                }
            }
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情五月婷婷综合| 91久久精品一区二区三| 亚洲欧洲av另类| 337p亚洲精品色噜噜噜| 国产成人综合亚洲网站| 免费观看一级欧美片| 亚洲黄色免费网站| 国产精品国产自产拍高清av| 日韩欧美的一区| 欧美日本韩国一区| 91九色最新地址| 白白色 亚洲乱淫| 国产盗摄一区二区三区| 蜜桃视频在线观看一区二区| 国内久久精品视频| 亚洲va韩国va欧美va| 国产精品成人一区二区艾草| 久久久亚洲精华液精华液精华液 | 免费观看久久久4p| 一区二区成人在线| 亚洲丝袜精品丝袜在线| 国产欧美日韩综合| 久久综合九色综合欧美亚洲| 日韩一区二区精品| 3d成人h动漫网站入口| 欧美蜜桃一区二区三区| 欧美性感一类影片在线播放| 色综合网站在线| 不卡av在线免费观看| 韩国三级在线一区| 国内精品久久久久影院色| 久久精品av麻豆的观看方式| 麻豆国产欧美日韩综合精品二区| 日韩中文字幕不卡| 日本伊人精品一区二区三区观看方式| 一区二区三区精品久久久| 亚洲综合色噜噜狠狠| 一区二区三区.www| 亚洲一卡二卡三卡四卡无卡久久| 亚洲免费在线视频| 一区二区三区欧美| 亚洲福利一二三区| 午夜激情久久久| 日韩电影免费在线观看网站| 首页国产欧美日韩丝袜| 蜜臀av国产精品久久久久| 久久福利资源站| 国产精品69毛片高清亚洲| 国产成人精品一区二| 不卡在线观看av| 色婷婷综合久色| 精品视频在线免费| 欧美一区二区三区在| 久久毛片高清国产| 国产精品进线69影院| 一区二区日韩av| 五月婷婷激情综合| 久久国产综合精品| 成人免费观看视频| 在线免费不卡视频| 91麻豆精品国产91久久久久久 | 国产欧美日本一区二区三区| 国产精品福利影院| 一区二区三区四区乱视频| 日韩精品一卡二卡三卡四卡无卡| 久久9热精品视频| 成人性视频网站| 欧美午夜一区二区三区免费大片| 91精品国产乱码| 国产性做久久久久久| 一区二区在线观看免费| 日韩av成人高清| 成人在线一区二区三区| 欧美三级午夜理伦三级中视频| 日韩女同互慰一区二区| 中文字幕亚洲在| 美女在线一区二区| 99久久国产免费看| 日韩精品在线一区二区| 自拍偷拍欧美激情| 久久www免费人成看片高清| 风间由美性色一区二区三区| 欧美日韩国产小视频| 久久久久久**毛片大全| 亚洲一区二区3| 国产成人免费在线| 欧美一区二区视频观看视频| 国产精品免费观看视频| 日日噜噜夜夜狠狠视频欧美人 | 亚洲在线成人精品| 国产真实乱子伦精品视频| 日本丰满少妇一区二区三区| 久久夜色精品一区| 舔着乳尖日韩一区| bt7086福利一区国产| 日韩色在线观看| 亚洲综合色区另类av| 国产成人鲁色资源国产91色综| 欧美精品 日韩| 亚洲精品视频自拍| 成人午夜视频网站| 精品美女一区二区| 视频一区二区欧美| 欧美自拍偷拍午夜视频| 国产精品久久久久7777按摩| 蜜臀av一区二区在线观看| 欧美唯美清纯偷拍| 18欧美乱大交hd1984| 国产在线精品视频| 欧美一区二区三区白人| 亚洲午夜精品久久久久久久久| 成人污污视频在线观看| 欧美精品一区二区蜜臀亚洲| 日韩电影免费在线观看网站| 在线观看www91| 亚洲桃色在线一区| 成人黄色网址在线观看| 久久久久久免费| 久久爱另类一区二区小说| 日韩一区二区电影在线| 日韩av不卡在线观看| 欧美精品tushy高清| 国产91精品入口| 精品av综合导航| 精品一区二区三区在线视频| 91麻豆精品久久久久蜜臀| 亚洲高清久久久| 欧美日韩精品系列| 亚洲一级不卡视频| 欧美日韩卡一卡二| 亚洲国产日韩a在线播放| 日本道在线观看一区二区| 一区二区三区在线视频免费观看 | 欧美日韩午夜在线| 一区二区三区成人| 欧美影片第一页| 亚洲gay无套男同| 欧美影院精品一区| 午夜精品久久一牛影视| 欧美老年两性高潮| 五月激情综合色| 日韩欧美高清一区| 国产主播一区二区| 国产三级一区二区| 99国产精品一区| 亚洲一区二区在线播放相泽| 欧美日韩欧美一区二区| 蜜桃av一区二区在线观看| 日韩精品中文字幕在线不卡尤物| 精品亚洲成a人在线观看 | 中文字幕一区在线观看| 91麻豆国产福利在线观看| 亚洲综合免费观看高清完整版 | 欧美精品 国产精品| 美女一区二区在线观看| 久久久久久久久一| 97精品国产露脸对白| 亚洲国产精品综合小说图片区| 宅男噜噜噜66一区二区66| 国内成人自拍视频| 中文字幕永久在线不卡| 欧美日韩成人一区| 国产一区二区三区在线看麻豆| 国产精品视频免费看| 91九色02白丝porn| 久久超级碰视频| 国产精品国产三级国产| 欧美日韩国产成人在线免费| 国产一区欧美日韩| 一区二区三区色| 欧美成人精品二区三区99精品| 国产成人在线视频网站| 亚洲一级电影视频| 久久蜜臀精品av| 精品日韩一区二区三区| 99久久99久久精品免费观看| 午夜日韩在线观看| 中国av一区二区三区| 欧美网站一区二区| 国产成人精品一区二| 午夜不卡av免费| 国产精品素人视频| 日韩小视频在线观看专区| av一区二区久久| 久久99精品网久久| 亚洲综合激情另类小说区| 精品欧美一区二区在线观看 | 99久久综合色| 美女性感视频久久| 一区二区三区影院| 久久久久久电影| 777亚洲妇女| 91麻豆国产精品久久| 国产在线一区二区综合免费视频| 亚洲欧美另类在线| 国产欧美精品国产国产专区| 91精品国产一区二区| 在线观看网站黄不卡| 国产精品一二三四五| 午夜欧美电影在线观看|