本文整理了Java中org.acegisecurity.Authentication.setAuthenticated()
方法的一些代码示例,展示了Authentication.setAuthenticated()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Authentication.setAuthenticated()
方法的具体详情如下:
包路径:org.acegisecurity.Authentication
类名称:Authentication
方法名:setAuthenticated
[英]See #isAuthenticated() for a full description.
Implementations should always allow this method to be called with a false
parameter, as this is used by various classes to specify the authentication token should not be trusted. If an implementation wishes to reject an invocation with a true
parameter (which would indicate the authentication token is trusted - a potential security risk) the implementation should throw an IllegalArgumentException.
[中]有关完整说明,请参见#isAuthenticated()。
实现应始终允许使用false
参数调用此方法,因为各种类都使用此参数来指定不应信任的身份验证令牌。如果实现希望拒绝使用true
参数的调用(这将表明身份验证令牌是可信的-存在潜在的安全风险),则该实现应抛出IllegalArgumentException。
代码示例来源:origin: org.mule.modules/mule-module-acegi
public void setAuthenticated(boolean b)
{
delegate.setAuthenticated(b);
}
代码示例来源:origin: org.acegisecurity/acegi-security
SecurityContextHolder.getContext().getAuthentication().setAuthenticated(false);
代码示例来源:origin: org.jenkins-ci.plugins/collabnet
auth.setAuthenticated(false);
内容来源于网络,如有侵权,请联系作者删除!