本文整理匯總了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;
}