File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed
msal4j-sdk/src/main/java/com/microsoft/aad/msal4j Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ private ITenantProfile getTenantProfile() {
9292 private final String scopes ;
9393
9494 @ Builder .Default
95- private final AuthenticationResultMetadata metadata = new AuthenticationResultMetadata ();
95+ private final AuthenticationResultMetadata metadata = AuthenticationResultMetadata . builder (). build ();
9696
9797 @ Getter (value = AccessLevel .PACKAGE )
9898 private final Boolean isPopAuthorization ;
Original file line number Diff line number Diff line change 44package com .microsoft .aad .msal4j ;
55
66import lombok .AccessLevel ;
7+ import lombok .Builder ;
78import lombok .Getter ;
89import lombok .Setter ;
910import lombok .experimental .Accessors ;
1617@ Accessors (fluent = true )
1718@ Getter
1819@ Setter (AccessLevel .PACKAGE )
20+ @ Builder
1921public class AuthenticationResultMetadata implements Serializable {
2022
2123 private TokenSource tokenSource ;
22-
23- /**
24- * Sets default metadata values. Used when creating an {@link IAuthenticationResult} before the values are known.
25- */
26- AuthenticationResultMetadata () {
27- }
28-
29- AuthenticationResultMetadata (TokenSource tokenSource ) {
30- this .tokenSource = tokenSource ;
31- }
24+ private Long refreshOn ;
3225}
Original file line number Diff line number Diff line change @@ -155,7 +155,10 @@ private AuthenticationResult createAuthenticationResultFromOauthHttpResponse(
155155 refreshOn (response .getRefreshIn () > 0 ? currTimestampSec + response .getRefreshIn () : 0 ).
156156 accountCacheEntity (accountCacheEntity ).
157157 scopes (response .getScope ()).
158- metadata (new AuthenticationResultMetadata (TokenSource .IDENTITY_PROVIDER )).
158+ metadata (AuthenticationResultMetadata .builder ()
159+ .tokenSource (TokenSource .IDENTITY_PROVIDER )
160+ .refreshOn (response .getRefreshIn () > 0 ? currTimestampSec + response .getRefreshIn () : 0 )
161+ .build ()).
159162 build ();
160163
161164 } else {
You can’t perform that action at this time.
0 commit comments