本文整理汇总了Java中org.pac4j.core.util.CommonHelper.areEquals方法的典型用法代码示例。如果您正苦于以下问题:Java CommonHelper.areEquals方法的具体用法?Java CommonHelper.areEquals怎么用?Java CommonHelper.areEquals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pac4j.core.util.CommonHelper
的用法示例。
在下文中一共展示了CommonHelper.areEquals方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: retrieveCredentials
import org.pac4j.core.util.CommonHelper; //导入方法依赖的package包/类
@Override
protected OpenIdCredentials retrieveCredentials(final WebContext context) throws HttpAction {
final String mode = context.getRequestParameter(OPENID_MODE);
// cancelled authentication
if (CommonHelper.areEquals(mode, CANCEL_MODE)) {
logger.debug("authentication cancelled");
return null;
}
// parameters list returned by the provider
final ParameterList parameterList = new ParameterList(context.getRequestParameters());
// retrieve the previously stored discovery information
final DiscoveryInformation discoveryInformation = (DiscoveryInformation) context
.getSessionAttribute(getDiscoveryInformationSessionAttributeName());
// create credentials
final OpenIdCredentials credentials = new OpenIdCredentials(discoveryInformation, parameterList, getName());
logger.debug("credentials: {}", credentials);
return credentials;
}
示例2: getCookie
import org.pac4j.core.util.CommonHelper; //导入方法依赖的package包/类
/**
* Get a specific cookie by its name.
*
* @param cookies provided cookies
* @param name the name of the cookie
* @return the cookie
*/
public static Cookie getCookie(final Collection<Cookie> cookies, final String name) {
if (cookies != null) {
for (final Cookie cookie : cookies) {
if (cookie != null && CommonHelper.areEquals(name, cookie.getName())) {
return cookie;
}
}
}
return null;
}
示例3: matches
import org.pac4j.core.util.CommonHelper; //导入方法依赖的package包/类
@Override
public boolean matches(final String plainPassword, final String encodedPassword) {
return CommonHelper.areEquals(plainPassword, encodedPassword);
}
示例4: matches
import org.pac4j.core.util.CommonHelper; //导入方法依赖的package包/类
@Override
public boolean matches(final String plainPassword, final String encodedPassword) {
CommonHelper.assertNotBlank("salt", salt);
return CommonHelper.areEquals(encode(plainPassword), encodedPassword);
}