Skip to content

Commit b0a4dcb

Browse files
committed
ClientSettings equals, hashCode, toString
Issue gh-16382
1 parent 2665a92 commit b0a4dcb

File tree

1 file changed

+23
-0
lines changed
  • oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/registration

1 file changed

+23
-0
lines changed

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/registration/ClientSettings.java

+23
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.security.oauth2.client.registration;
1818

19+
import java.util.Objects;
20+
1921
/**
2022
* A facility for client configuration settings.
2123
*
@@ -34,6 +36,27 @@ public boolean isRequireProofKey() {
3436
return this.requireProofKey;
3537
}
3638

39+
@Override
40+
public boolean equals(Object o) {
41+
if (this == o) {
42+
return true;
43+
}
44+
if (!(o instanceof ClientSettings that)) {
45+
return false;
46+
}
47+
return this.requireProofKey == that.requireProofKey;
48+
}
49+
50+
@Override
51+
public int hashCode() {
52+
return Objects.hashCode(this.requireProofKey);
53+
}
54+
55+
@Override
56+
public String toString() {
57+
return "ClientSettings{" + "requireProofKey=" + this.requireProofKey + '}';
58+
}
59+
3760
public static Builder builder() {
3861
return new Builder();
3962
}

0 commit comments

Comments
 (0)