File tree Expand file tree Collapse file tree 3 files changed +48
-22
lines changed
firebase-auth-rest/core/src/main/java/com/anotherdev/firebase/auth Expand file tree Collapse file tree 3 files changed +48
-22
lines changed Original file line number Diff line number Diff line change 11package com .anotherdev .firebase .auth ;
22
3- @ SuppressWarnings ("WeakerAccess" )
4- public class SignInResponse {
3+ import androidx .annotation .Nullable ;
54
6- String idToken ;
7- String email ;
8- String refreshToken ;
9- String expiresIn ;
10- String localId ;
5+ import com .google .gson .annotations .SerializedName ;
116
7+ import org .immutables .gson .Gson ;
8+ import org .immutables .value .Value ;
129
13- public String getIdToken () {
14- return idToken ;
15- }
10+ @ Value .Immutable
11+ @ Value .Style (strictBuilder = true )
12+ @ Gson .TypeAdapters
13+ public interface SignInResponse {
1614
17- public String getEmail () {
18- return email ;
19- }
15+ @ SerializedName ("idToken" )
16+ String getIdToken ();
2017
21- public String getRefreshToken () {
22- return refreshToken ;
23- }
18+ @ Nullable
19+ @ SerializedName ("email" )
20+ String getEmail ();
21+
22+ @ SerializedName ("refreshToken" )
23+ String getRefreshToken ();
24+
25+ @ SerializedName ("expiresIn" )
26+ String getExpiresIn ();
27+
28+ @ SerializedName ("localId" )
29+ String getLocalId ();
2430
25- public String getExpiresIn () {
26- return expiresIn ;
27- }
2831
29- public String getLocalId () {
30- return localId ;
32+ static ImmutableSignInResponse . Builder builder () {
33+ return ImmutableSignInResponse . builder () ;
3134 }
3235}
Original file line number Diff line number Diff line change 1+ package com .anotherdev .firebase .auth ;
2+
3+ @ SuppressWarnings ("WeakerAccess" )
4+ public class UserProfileChangeResponse {
5+
6+ String localId ;
7+ String email ;
8+ String displayName ;
9+
10+
11+ public String getLocalId () {
12+ return localId ;
13+ }
14+
15+ public String getEmail () {
16+ return email ;
17+ }
18+
19+ public String getDisplayName () {
20+ return displayName ;
21+ }
22+ }
Original file line number Diff line number Diff line change 22
33import com .anotherdev .firebase .auth .SignInResponse ;
44import com .anotherdev .firebase .auth .UserProfileChangeRequest ;
5+ import com .anotherdev .firebase .auth .UserProfileChangeResponse ;
56import com .anotherdev .firebase .auth .rest .api .model .IdTokenRequest ;
67import com .anotherdev .firebase .auth .rest .api .model .SignInRequest ;
78import com .anotherdev .firebase .auth .rest .api .model .SignInWithCustomTokenRequest ;
@@ -39,7 +40,7 @@ public interface IdentityToolkitApi {
3940 Single <JsonObject > getAccounts (@ Body IdTokenRequest request );
4041
4142 @ POST ("v1/accounts:update" )
42- Single <SignInResponse > updateProfile (@ Body UserProfileChangeRequest request );
43+ Single <UserProfileChangeResponse > updateProfile (@ Body UserProfileChangeRequest request );
4344
4445 @ POST ("v1/accounts:update" )
4546 Single <SignInResponse > updatePassword (@ Body UserPasswordChangeRequest request );
You can’t perform that action at this time.
0 commit comments