File tree Expand file tree Collapse file tree 3 files changed +108
-0
lines changed
Expand file tree Collapse file tree 3 files changed +108
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ #import " GoogleSignIn/Sources/Public/GoogleSignIn/GIDUserAuth.h"
18+
19+ #import " GoogleSignIn/Sources/GIDUserAuth_Private.h"
20+ #import " GoogleSignIn/Sources/Public/GoogleSignIn/GIDGoogleUser.h"
21+
22+ @implementation GIDUserAuth
23+
24+ - (instancetype )initWithGoogleUser : (GIDGoogleUser *)user
25+ serverAuthCode : (nullable NSString *)serverAuthCode {
26+ self = [super init ];
27+ if (self) {
28+ _user = user;
29+ _serverAuthCode = serverAuthCode;
30+ }
31+
32+ return self;
33+ }
34+
35+ @end
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ #import " GoogleSignIn/Sources/Public/GoogleSignIn/GIDUserAuth.h"
18+
19+ NS_ASSUME_NONNULL_BEGIN
20+
21+ // Private |GIDUserAuth| methods that are used in this SDK.
22+ @interface GIDUserAuth ()
23+
24+ // Private initializer for |GIDUserAuth|.
25+ // @param user The current GIDGoogleUser.
26+ // @param severAuthCode The one-time authorization code for backend to exchange
27+ // access and refresh tokens.
28+ - (instancetype )initWithGoogleUser : (GIDGoogleUser *)user
29+ serverAuthCode : (nullable NSString *)serverAuthCode ;
30+
31+ @end
32+
33+ NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ #import < Foundation/Foundation.h>
18+
19+ @class GIDGoogleUser;
20+
21+ NS_ASSUME_NONNULL_BEGIN
22+
23+ // / A helper object that contains the outcome of a successful signIn or addScopes flow.
24+ @interface GIDUserAuth : NSObject
25+
26+ // / The updated `GIDGoogleUser` instance for the user who just completed the flow.
27+ @property (nonatomic , readonly ) GIDGoogleUser *user;
28+
29+ // / An OAuth2 authorization code for the home server.
30+ @property (nonatomic , readonly , nullable ) NSString *serverAuthCode;
31+
32+ // / Unsupported.
33+ + (instancetype )new NS_UNAVAILABLE;
34+
35+ // / Unsupported.
36+ - (instancetype )init NS_UNAVAILABLE;
37+
38+ @end
39+
40+ NS_ASSUME_NONNULL_END
You can’t perform that action at this time.
0 commit comments