本文整理了Java中org.springframework.security.authentication.AbstractAuthenticationToken.equals()
方法的一些代码示例,展示了AbstractAuthenticationToken.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractAuthenticationToken.equals()
方法的具体详情如下:
包路径:org.springframework.security.authentication.AbstractAuthenticationToken
类名称:AbstractAuthenticationToken
方法名:equals
暂无
代码示例来源:origin: spring-projects/spring-security
@Override
public boolean equals(Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof AnonymousAuthenticationToken) {
AnonymousAuthenticationToken test = (AnonymousAuthenticationToken) obj;
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: spring-projects/spring-security
@Override
public boolean equals(Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof RememberMeAuthenticationToken) {
RememberMeAuthenticationToken test = (RememberMeAuthenticationToken) obj;
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: org.springframework.security/spring-security-core
@Override
public boolean equals(Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof AnonymousAuthenticationToken) {
AnonymousAuthenticationToken test = (AnonymousAuthenticationToken) obj;
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: org.springframework.security/spring-security-core
@Override
public boolean equals(Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof RememberMeAuthenticationToken) {
RememberMeAuthenticationToken test = (RememberMeAuthenticationToken) obj;
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: spring-projects/spring-security
@Override
public boolean equals(final Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof CasAuthenticationToken) {
CasAuthenticationToken test = (CasAuthenticationToken) obj;
if (!this.assertion.equals(test.getAssertion())) {
return false;
}
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: spring-projects/spring-security-oauth
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof OAuth2Authentication)) {
return false;
}
if (!super.equals(o)) {
return false;
}
OAuth2Authentication that = (OAuth2Authentication) o;
if (!storedRequest.equals(that.storedRequest)) {
return false;
}
if (userAuthentication != null ? !userAuthentication.equals(that.userAuthentication)
: that.userAuthentication != null) {
return false;
}
if (getDetails()!=null ? !getDetails().equals(that.getDetails()) : that.getDetails()!=null) {
// return false;
}
return true;
}
代码示例来源:origin: org.springframework.security.kerberos/spring-security-kerberos-core
/**
* equals() is based only on the Kerberos token
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
KerberosServiceRequestToken other = (KerberosServiceRequestToken) obj;
if (!Arrays.equals(token, other.token))
return false;
return true;
}
代码示例来源:origin: org.apache.cxf.fediz/fediz-idp-core
/**
* equals() is based only on the Kerberos token
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
KerberosServiceRequestToken other = (KerberosServiceRequestToken) obj;
if (!Arrays.equals(token, other.token)) { //NOPMD
return false;
}
return true;
}
代码示例来源:origin: 1and1/cosmo
/**
* Equals.
* {@inheritDoc}
* @param obj The obj.
* @return The result.
*/
@Override
public boolean equals(Object obj) {
if (! super.equals(obj)) {
return false;
}
if (! (obj instanceof TicketAuthenticationToken)) {
return false;
}
TicketAuthenticationToken test = (TicketAuthenticationToken) obj;
//After authentication, the token's principal is the {@link Ticket} itself.
return ticket.equals(test.getPrincipal());
}
代码示例来源:origin: net.oneandone.cosmo/cosmo-core
/**
* Equals.
* {@inheritDoc}
* @param obj The obj.
* @return The result.
*/
@Override
public boolean equals(Object obj) {
if (! super.equals(obj)) {
return false;
}
if (! (obj instanceof TicketAuthenticationToken)) {
return false;
}
TicketAuthenticationToken test = (TicketAuthenticationToken) obj;
//After authentication, the token's principal is the {@link Ticket} itself.
return ticket.equals(test.getPrincipal());
}
代码示例来源:origin: OneBusAway/onebusaway-application-modules
public boolean equals(Object obj) {
if (!super.equals(obj))
return false;
if (obj instanceof EveryLastLoginAuthenticationToken) {
EveryLastLoginAuthenticationToken test = (EveryLastLoginAuthenticationToken) obj;
return this.getKeyHash() == test.getKeyHash();
}
return false;
}
代码示例来源:origin: org.springframework.security/org.springframework.security.core
public boolean equals(Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof AnonymousAuthenticationToken) {
AnonymousAuthenticationToken test = (AnonymousAuthenticationToken) obj;
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: org.springframework.security/org.springframework.security.core
public boolean equals(Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof RememberMeAuthenticationToken) {
RememberMeAuthenticationToken test = (RememberMeAuthenticationToken) obj;
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public boolean equals(Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof AnonymousAuthenticationToken) {
AnonymousAuthenticationToken test = (AnonymousAuthenticationToken) obj;
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public boolean equals(Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof RememberMeAuthenticationToken) {
RememberMeAuthenticationToken test = (RememberMeAuthenticationToken) obj;
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public boolean equals(final Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof CasAuthenticationToken) {
CasAuthenticationToken test = (CasAuthenticationToken) obj;
if (!this.assertion.equals(test.getAssertion())) {
return false;
}
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: org.springframework.security/spring-security-cas
@Override
public boolean equals(final Object obj) {
if (!super.equals(obj)) {
return false;
}
if (obj instanceof CasAuthenticationToken) {
CasAuthenticationToken test = (CasAuthenticationToken) obj;
if (!this.assertion.equals(test.getAssertion())) {
return false;
}
if (this.getKeyHash() != test.getKeyHash()) {
return false;
}
return true;
}
return false;
}
代码示例来源:origin: org.springframework.security.oauth/spring-security-oauth2
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof OAuth2Authentication)) {
return false;
}
if (!super.equals(o)) {
return false;
}
OAuth2Authentication that = (OAuth2Authentication) o;
if (!storedRequest.equals(that.storedRequest)) {
return false;
}
if (userAuthentication != null ? !userAuthentication.equals(that.userAuthentication)
: that.userAuthentication != null) {
return false;
}
if (getDetails()!=null ? !getDetails().equals(that.getDetails()) : that.getDetails()!=null) {
// return false;
}
return true;
}
内容来源于网络,如有侵权,请联系作者删除!