本文整理汇总了Java中org.alfresco.repo.security.authentication.ntlm.NTLMPassthruToken类的典型用法代码示例。如果您正苦于以下问题:Java NTLMPassthruToken类的具体用法?Java NTLMPassthruToken怎么用?Java NTLMPassthruToken使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NTLMPassthruToken类属于org.alfresco.repo.security.authentication.ntlm包,在下文中一共展示了NTLMPassthruToken类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAuthContext
import org.alfresco.repo.security.authentication.ntlm.NTLMPassthruToken; //导入依赖的package包/类
/**
* Return an authentication context for the new session
*
* @return AuthContext
*/
public AuthContext getAuthContext( SMBSrvSession sess)
{
// Check if the client is already authenticated, and it is not a null logon
AuthContext authCtx = null;
if ( sess.hasAuthenticationContext() && sess.getClientInformation().getLogonType() != ClientInfo.LogonNull)
{
// Return the previous challenge, user is already authenticated
authCtx = sess.getAuthenticationContext();
// DEBUG
if ( logger.isDebugEnabled())
logger.debug("Re-using existing challenge, already authenticated");
}
else if ( getNTLMAuthenticator().getNTLMMode() == NTLMMode.MD4_PROVIDER)
{
// Create a new authentication context for the session
authCtx = new NTLanManAuthContext();
sess.setAuthenticationContext( authCtx);
}
else
{
// Create an authentication token for the session
NTLMPassthruToken authToken = new NTLMPassthruToken( mapClientAddressToDomain( sess.getRemoteAddress()));
// Run the first stage of the passthru authentication to get the challenge
getNTLMAuthenticator().authenticate( authToken);
// Save the authentication token for the second stage of the authentication
authCtx = new AuthTokenAuthContext( authToken);
sess.setAuthenticationContext( authCtx);
}
// Return the authentication context
return authCtx;
}
示例2: AuthTokenAuthContext
import org.alfresco.repo.security.authentication.ntlm.NTLMPassthruToken; //导入依赖的package包/类
/**
* Class constructor
*
* @param token NTLMPassthruToken
*/
public AuthTokenAuthContext( NTLMPassthruToken token)
{
m_token = token;
}
示例3: getToken
import org.alfresco.repo.security.authentication.ntlm.NTLMPassthruToken; //导入依赖的package包/类
/**
* Return the passthru authentication token
*
* @return NTLMPassthruToken
*/
public final NTLMPassthruToken getToken()
{
return m_token;
}