Skip to content

Commit 99157c5

Browse files
committed
init
1 parent 7f75975 commit 99157c5

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright 2025 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 GIDTokenClaim;
20+
21+
NS_ASSUME_NONNULL_BEGIN
22+
23+
extern NSString *const kTokenClaimErrorDescription;
24+
25+
extern NSString *const kTokenClaimEssentialPropertyKeyName;
26+
extern NSString *const kTokenClaimKeyName;
27+
28+
/**
29+
* An internal utility class for processing and serializing the NSSet of GIDTokenClaim objects
30+
* into the JSON format required for an OIDAuthorizationRequest.
31+
*/
32+
@interface GIDTokenClaimsInternalOptions : NSObject
33+
34+
/**
35+
* Processes the NSSet of GIDTokenClaim objects, handling ambiguous claims, and returns a JSON string.
36+
*
37+
* @param claims The NSSet of GIDTokenClaim objects provided by the developer.
38+
* @param error A pointer to an NSError object to be populated if an error occurs (e.g., if a
39+
* claim is requested as both essential and non-essential).
40+
* @return A JSON string representing the claims request, or nil if the input is empty or an
41+
* error occurs.
42+
*/
43+
+ (nullable NSString *)validatedJSONStringForClaims:(nullable NSSet<GIDTokenClaim *> *)claims
44+
error:(NSError **)error;
45+
46+
@end
47+
48+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)