File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
common/src/main/java/com/walmartlabs/concord/common Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 2121 */
2222
2323import com .fasterxml .jackson .annotation .JsonFormat ;
24+ import com .fasterxml .jackson .annotation .JsonIgnore ;
2425import com .fasterxml .jackson .annotation .JsonProperty ;
2526import com .fasterxml .jackson .databind .annotation .JsonDeserialize ;
2627import org .immutables .value .Value ;
@@ -45,6 +46,8 @@ public interface ExternalAuthToken {
4546 @ JsonFormat (shape = JsonFormat .Shape .STRING , pattern = "yyyy-MM-dd'T'HH:mm:ss[.SSS]X" )
4647 OffsetDateTime expiresAt ();
4748
49+ @ Value .Default
50+ @ JsonIgnore
4851 default long secondsUntilExpiration () {
4952 if (expiresAt () == null ) {
5053 return Long .MAX_VALUE ;
@@ -79,12 +82,6 @@ default OffsetDateTime expiresAt() {
7982 return null ;
8083 }
8184
82- @ Value .Default
83- @ Override
84- default long secondsUntilExpiration () {
85- return Long .MAX_VALUE ;
86- }
87-
8885 static ImmutableStaticToken .Builder builder () {
8986 return ImmutableStaticToken .builder ();
9087 }
You can’t perform that action at this time.
0 commit comments