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

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

?? sampleazn.java

?? JavaTM 2 SDK, Standard Edition Documentation
?? JAVA
字號:
/* * @(#)SampleAzn.java * * Copyright 2001-2002 Sun Microsystems, Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or  * without modification, are permitted provided that the following  * conditions are met: *  * -Redistributions of source code must retain the above copyright   * notice, this  list of conditions and the following disclaimer. *  * -Redistribution in binary form must reproduct the above copyright  * notice, this list of conditions and the following disclaimer in  * the documentation and/or other materials provided with the  * distribution. *  * Neither the name of Sun Microsystems, Inc. or the names of  * contributors may be used to endorse or promote products derived  * from this software without specific prior written permission. *  * This software is provided "AS IS," without a warranty of any  * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND  * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY  * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY  * DAMAGES OR LIABILITIES  SUFFERED BY LICENSEE AS A RESULT OF  OR  * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR  * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE  * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,  * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER  * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF  * THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. *  * You acknowledge that Software is not designed, licensed or  * intended for use in the design, construction, operation or  * maintenance of any nuclear facility.  */package sample;import java.io.*;import java.util.*;import java.security.Principal;import java.security.PrivilegedAction;import javax.security.auth.*;import javax.security.auth.callback.*;import javax.security.auth.login.*;import javax.security.auth.spi.*;import com.sun.security.auth.*;/** * <p> This Sample application attempts to authenticate a user * and executes a SampleAction as that user. * * <p> If the user successfully authenticates itself, * the username and number of Credentials is displayed. */public class SampleAzn {    /**     * Attempt to authenticate the user.     *     * <p>     *      * @param args input arguments for this application.  These are ignored.     */     public static void main(String[] args) {	// Obtain a LoginContext, needed for authentication. Tell it 	// to use the LoginModule implementation specified by the 	// entry named "Sample" in the JAAS login configuration 	// file and to also use the specified CallbackHandler.	LoginContext lc = null;	try {	    lc = new LoginContext("Sample", new MyCallbackHandler());	} catch (LoginException le) {	    System.err.println("Cannot create LoginContext. "	        + le.getMessage());	    System.exit(-1);	} catch (SecurityException se) {	    System.err.println("Cannot create LoginContext. "	        + se.getMessage());	    System.exit(-1);	} 	// the user has 3 attempts to authenticate successfully	int i;	for (i = 0; i < 3; i++) {	    try {		// attempt authentication		lc.login();		// if we return with no exception, authentication succeeded		break;	    } catch (LoginException le) {		  System.err.println("Authentication failed:");		  System.err.println("  " + le.getMessage());		  try {		      Thread.currentThread().sleep(3000);		  } catch (Exception e) {		      // ignore		  } 		    }	}	// did they fail three times?	if (i == 3) {	    System.out.println("Sorry");	    System.exit(-1);	}	System.out.println("Authentication succeeded!");	Subject mySubject = lc.getSubject();	// let's see what Principals we have	Iterator principalIterator = mySubject.getPrincipals().iterator();	System.out.println("Authenticated user has the following Principals:");	while (principalIterator.hasNext()) {	    Principal p = (Principal)principalIterator.next();	    System.out.println("\t" + p.toString());	}	System.out.println("User has " +			mySubject.getPublicCredentials().size() +			" Public Credential(s)");	// now try to execute the SampleAction as the authenticated Subject	PrivilegedAction action = new SampleAction();	Subject.doAsPrivileged(mySubject, action, null);	System.exit(0);    }}/** * A CallbackHandler implemented by the application. * * <p> This application is text-based.  Therefore it displays information * to the user using the OutputStreams System.out and System.err, * and gathers input from the user using the InputStream System.in. */class MyCallbackHandler implements CallbackHandler {    /**     * Invoke an array of Callbacks.     *     * <p>     *     * @param callbacks an array of <code>Callback</code> objects which contain     *			the information requested by an underlying security     *			service to be retrieved or displayed.     *     * @exception java.io.IOException if an input or output error occurs. <p>     *     * @exception UnsupportedCallbackException if the implementation of this     *			method does not support one or more of the Callbacks     *			specified in the <code>callbacks</code> parameter.     */    public void handle(Callback[] callbacks)    throws IOException, UnsupportedCallbackException {      	for (int i = 0; i < callbacks.length; i++) {	    if (callbacks[i] instanceof TextOutputCallback) {      		// display the message according to the specified type		TextOutputCallback toc = (TextOutputCallback)callbacks[i];		switch (toc.getMessageType()) {		case TextOutputCallback.INFORMATION: 		    System.out.println(toc.getMessage()); 		    break; 		case TextOutputCallback.ERROR: 		    System.out.println("ERROR: " + toc.getMessage()); 		    break; 		case TextOutputCallback.WARNING: 		    System.out.println("WARNING: " + toc.getMessage()); 		    break; 		default: 		    throw new IOException("Unsupported message type: " + 					toc.getMessageType()); 		}  	    } else if (callbacks[i] instanceof NameCallback) {   		// prompt the user for a username 		NameCallback nc = (NameCallback)callbacks[i];   		System.err.print(nc.getPrompt()); 		System.err.flush(); 		nc.setName((new BufferedReader			(new InputStreamReader(System.in))).readLine());  	    } else if (callbacks[i] instanceof PasswordCallback) {   		// prompt the user for sensitive information 		PasswordCallback pc = (PasswordCallback)callbacks[i]; 		System.err.print(pc.getPrompt()); 		System.err.flush(); 		pc.setPassword(readPassword(System.in));   	    } else { 		throw new UnsupportedCallbackException 			(callbacks[i], "Unrecognized Callback"); 	    }	}    }       // Reads user password from given input stream.    private char[] readPassword(InputStream in) throws IOException {		char[] lineBuffer;	char[] buf;	int i;	buf = lineBuffer = new char[128];	int room = buf.length;	int offset = 0;	int c;loop:	while (true) { 	    switch (c = in.read()) { 	    case -1: 	    case '\n':		break loop; 	    case '\r': 		int c2 = in.read(); 		if ((c2 != '\n') && (c2 != -1)) { 		    if (!(in instanceof PushbackInputStream)) { 			in = new PushbackInputStream(in); 		    } 		    ((PushbackInputStream)in).unread(c2); 		} else 		    break loop; 	    default: 		if (--room < 0) { 		    buf = new char[offset + 128]; 		    room = buf.length - offset - 1; 		    System.arraycopy(lineBuffer, 0, buf, 0, offset); 		    Arrays.fill(lineBuffer, ' '); 		    lineBuffer = buf; 		} 		buf[offset++] = (char) c; 		break; 	    } 	} 	if (offset == 0) { 	    return null; 	} 	char[] ret = new char[offset]; 	System.arraycopy(buf, 0, ret, 0, offset); 	Arrays.fill(buf, ' '); 	return ret;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
26uuu精品一区二区三区四区在线| 91麻豆国产精品久久| 中文字幕一区二区三区乱码在线| 欧美猛男超大videosgay| 丁香六月久久综合狠狠色| 日韩av中文在线观看| 亚洲图片激情小说| 久久婷婷成人综合色| 欧美伊人久久大香线蕉综合69 | 欧美老肥妇做.爰bbww视频| 国产精品乡下勾搭老头1| 午夜精品一区二区三区免费视频 | 欧美一区二区女人| 91国内精品野花午夜精品| 国产精品911| 免费日本视频一区| 亚洲制服丝袜在线| 中文字幕在线不卡国产视频| 26uuu久久天堂性欧美| 91精品国产色综合久久| 在线一区二区观看| 99re在线精品| 北岛玲一区二区三区四区| 国产一区二区三区在线观看免费视频| 午夜精品成人在线视频| 日韩理论在线观看| 自拍视频在线观看一区二区| 欧美极品另类videosde| 久久老女人爱爱| 亚洲精品一区二区三区香蕉| 日韩视频在线永久播放| 欧美二区三区的天堂| 欧美情侣在线播放| 欧美亚洲动漫另类| 欧美特级限制片免费在线观看| 91亚洲精品久久久蜜桃网站| 99精品视频在线观看| proumb性欧美在线观看| 99精品桃花视频在线观看| 成人av高清在线| 99精品久久久久久| 91碰在线视频| 在线视频综合导航| 在线亚洲免费视频| 欧美日韩国产天堂| 337p亚洲精品色噜噜狠狠| 在线综合视频播放| 日韩欧美一区二区在线视频| 欧美一级专区免费大片| 日韩午夜激情免费电影| 亚洲精品一区二区三区香蕉| 亚洲一二三区视频在线观看| 亚洲专区一二三| 日韩av在线免费观看不卡| 美女视频网站久久| 国产精品小仙女| 99国产精品久久久久久久久久 | 亚洲人成在线播放网站岛国| 一区二区三区四区激情| 亚洲高清免费观看高清完整版在线观看| 有码一区二区三区| 日韩国产欧美在线观看| 久久精品免费观看| 丁香激情综合国产| 欧美在线观看18| 日韩免费视频一区二区| 国产清纯白嫩初高生在线观看91| 亚洲特级片在线| 天天综合天天综合色| 国产麻豆91精品| 91麻豆免费视频| 91精品国产综合久久久久久久| 精品sm在线观看| ㊣最新国产の精品bt伙计久久| 亚洲国产精品久久艾草纯爱| 另类小说图片综合网| 成人激情校园春色| 欧美日韩黄色影视| 国产网红主播福利一区二区| 亚洲欧美乱综合| 精品一区二区三区免费观看| 成人h动漫精品一区二| 欧美美女网站色| 国产精品美女久久久久久久久久久| 一区二区三区精品视频在线| 乱中年女人伦av一区二区| 91免费看片在线观看| 日韩限制级电影在线观看| 综合中文字幕亚洲| 六月丁香婷婷久久| 91成人在线免费观看| 久久婷婷国产综合国色天香| 亚洲二区在线观看| 国产成人av电影在线| 7799精品视频| 成人免费在线播放视频| 老司机午夜精品| 精品视频色一区| 亚洲欧美在线视频观看| 麻豆精品久久久| 欧美三级三级三级| 亚洲欧洲日产国产综合网| 国产在线播放一区二区三区| 欧美日韩在线免费视频| 国产精品国产自产拍在线| 久久99深爱久久99精品| 欧美偷拍一区二区| 亚洲免费在线观看视频| 国产成人综合精品三级| 欧美一级夜夜爽| 亚洲成av人**亚洲成av**| 99re66热这里只有精品3直播| 久久综合国产精品| 蜜桃av一区二区在线观看| 欧美性一级生活| 亚洲女与黑人做爰| 成人免费高清在线观看| 久久精品在这里| 久久国产精品色| 制服丝袜亚洲色图| 亚洲国产综合色| 91搞黄在线观看| 亚洲人吸女人奶水| 制服.丝袜.亚洲.另类.中文| 亚洲一区精品在线| 91免费观看在线| 中文字幕制服丝袜成人av| 国产成人精品综合在线观看| 欧美成人a∨高清免费观看| 免费成人深夜小野草| 欧美一区二区三区在线看| 天天做天天摸天天爽国产一区| 欧美综合色免费| 亚洲mv大片欧洲mv大片精品| 欧美网站一区二区| 天天色图综合网| 欧美老肥妇做.爰bbww| 日本不卡的三区四区五区| 欧美老女人第四色| 男人的天堂亚洲一区| 日韩欧美国产高清| 精品亚洲国内自在自线福利| 精品国产一区二区三区四区四| 美女www一区二区| 欧美不卡在线视频| 国产精品99久久不卡二区| 欧美国产综合一区二区| 91在线免费播放| 尤物av一区二区| 91麻豆精品国产91久久久久久| 日本少妇一区二区| 精品av综合导航| 成人福利视频在线看| 一区二区激情小说| 337p亚洲精品色噜噜狠狠| 国产中文字幕一区| 中文字幕一区二区三区精华液 | 91免费版pro下载短视频| 一二三四区精品视频| 欧美一区二视频| 黄色精品一二区| 国产精品久久久久aaaa樱花| 在线观看一区二区精品视频| 首页欧美精品中文字幕| 精品国产免费久久| www.色综合.com| 天堂午夜影视日韩欧美一区二区| 精品久久久久一区| 国产69精品久久久久777| 亚洲摸摸操操av| 欧美大片拔萝卜| 99re热视频精品| 麻豆专区一区二区三区四区五区| 国产日韩欧美综合一区| 一本色道a无线码一区v| 日韩av一二三| 国产欧美一区二区精品性色超碰 | 亚洲综合999| 欧美精品一区二区在线观看| av电影在线观看不卡| 日本不卡一二三区黄网| 中文字幕一区二区三区色视频| 欧美二区乱c少妇| 成人国产一区二区三区精品| 奇米在线7777在线精品| 国产女主播在线一区二区| 欧美日韩国产高清一区二区| 国产激情精品久久久第一区二区| 亚洲一区二区三区四区五区中文| 欧美成人猛片aaaaaaa| 日本韩国欧美在线| 国产露脸91国语对白| 婷婷亚洲久悠悠色悠在线播放| 国产精品亲子乱子伦xxxx裸| 欧美精品18+| 97久久超碰国产精品电影| 国产一区二区三区观看| 日本特黄久久久高潮| 亚洲另类色综合网站| 国产欧美中文在线|