GIDConfiguration
@interface GIDConfiguration : NSObject <NSCopying, NSSecureCoding>
This class represents the client configuration provided by the developer.
-
The client ID of the app from the Google Cloud Console.
Declaration
Swift
var clientID: String { get }
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull clientID;
-
The client ID of the home server. This will be returned as the
audience
property of the OpenID Connect ID token. For more info on the ID token: https://developers.google.com/identity/sign-in/ios/backend-authDeclaration
Swift
var serverClientID: String? { get }
Objective-C
@property (nonatomic, readonly, nullable) NSString *serverClientID;
-
The Google Apps domain to which users must belong to sign in. To verify, check
GIDGoogleUser
‘shostedDomain
property.Declaration
Swift
var hostedDomain: String? { get }
Objective-C
@property (nonatomic, readonly, nullable) NSString *hostedDomain;
-
The OpenID2 realm of the home server. This allows Google to include the user’s OpenID Identifier in the OpenID Connect ID token.
Declaration
Swift
var openIDRealm: String? { get }
Objective-C
@property (nonatomic, readonly, nullable) NSString *openIDRealm;
-
Initialize a
GIDConfiguration
object with a client ID.Declaration
Swift
convenience init(clientID: String)
Objective-C
- (nonnull instancetype)initWithClientID:(nonnull NSString *)clientID;
Parameters
clientID
The client ID of the app.
Return Value
An initialized
GIDConfiguration
instance. -
Initialize a
GIDConfiguration
object with a client ID and server client ID.Declaration
Swift
convenience init(clientID: String, serverClientID: String?)
Objective-C
- (nonnull instancetype)initWithClientID:(nonnull NSString *)clientID serverClientID:(nullable NSString *)serverClientID;
Parameters
clientID
The client ID of the app.
serverClientID
The server’s client ID.
Return Value
An initialized
GIDConfiguration
instance. -
Initialize a
GIDConfiguration
object by specifying all available properties.Declaration
Swift
init(clientID: String, serverClientID: String?, hostedDomain: String?, openIDRealm: String?)
Objective-C
- (nonnull instancetype)initWithClientID:(nonnull NSString *)clientID serverClientID:(nullable NSString *)serverClientID hostedDomain:(nullable NSString *)hostedDomain openIDRealm:(nullable NSString *)openIDRealm;
Parameters
clientID
The client ID of the app.
serverClientID
The server’s client ID.
hostedDomain
The Google Apps domain to be used.
openIDRealm
The OpenID realm to be used.
Return Value
An initialized
GIDConfiguration
instance.