principalbearingcredentialsauthenticationhandler.java
来自「CAS在Tomcat中实现单点登录项目,单点登录(Single Sign On 」· Java 代码 · 共 41 行
JAVA
41 行
/* * Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license * distributed with this file and available online at * http://www.ja-sig.org/products/cas/overview/license/ */package org.jasig.cas.adaptors.trusted.authentication.handler.support;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.jasig.cas.adaptors.trusted.authentication.principal.PrincipalBearingCredentials;import org.jasig.cas.authentication.handler.AuthenticationHandler;import org.jasig.cas.authentication.principal.Credentials;/** * AuthenticationHandler which authenticates Principal-bearing credentials. * Authentication must have occured at the time the Principal-bearing * credentials were created, so we perform no further authentication. Thus * merely by being presented a PrincipalBearingCredentials, this handler returns * true. * * @author Andrew Petro * @version $Revision: 39552 $ $Date: 2007-01-22 15:35:37 -0500 (Mon, 22 Jan 2007) $ * @since 3.0.5 */public final class PrincipalBearingCredentialsAuthenticationHandler implements AuthenticationHandler { private Log log = LogFactory.getLog(this.getClass()); public boolean authenticate(final Credentials credentials) { if (log.isDebugEnabled()) { log.debug("Trusting credentials for: " + credentials); } return true; } public boolean supports(final Credentials credentials) { return credentials.getClass().equals(PrincipalBearingCredentials.class); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?