Class AN_GoogleSignInOptions.Builder
Builder for AN_GoogleSignInOptions.
Inheritance
Namespace: SA.Android.GMS.Auth
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class Builder : AN_LinkedObject
Constructors
Builder(Int32)
Default Builder for AN_GoogleSignInOptions which starts with clean configuration.
Declaration
public Builder(int singInConf = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | singInConf | The predefined Builder configuration, use DEFAULT_GAMES_SIGN_IN or DEFAULT_SIGN_IN |
Methods
Build()
Builds the AN_GoogleSignInOptions object.
Declaration
public AN_GoogleSignInOptions Build()
Returns
Type | Description |
---|---|
AN_GoogleSignInOptions |
RequestEmail()
Specifies that email info is requested by your application.
Declaration
public void RequestEmail()
RequestId()
Specifies that user ID is requested by your application.
Declaration
public void RequestId()
RequestIdToken(String)
Specifies that an ID token for authenticated users is requested. Requesting an ID token requires that the server client ID be specified.
Declaration
public void RequestIdToken(string serverClientId)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverClientId | The client ID of the server that will verify the integrity of the token. |
RequestProfile()
Specifies that user's profile info is requested by your application
Declaration
public void RequestProfile()
RequestScope(AN_Scope)
Specifies OAuth 2.0 scopes your application requests. See
Declaration
public void RequestScope(AN_Scope scope)
Parameters
Type | Name | Description |
---|---|---|
AN_Scope | scope | An OAuth 2.0 scope requested by your app. |
RequestServerAuthCode(String, Boolean)
Specifies that offline access is requested. Requesting offline access requires that the server client ID be specified.
You don't need to use RequestIdToken(String) when you use this option. When your server exchanges the code for tokens, an ID token will be returned together (as long as you either use RequestEmail() or RequestProfile() along with this configuration).
Declaration
public void RequestServerAuthCode(string serverClientId, bool forceCodeForRefreshToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverClientId | The client ID of the server that will need the auth code. |
System.Boolean | forceCodeForRefreshToken | If true, the granted code can be exchanged for an access token and a refresh token. The first time you retrieve a code, a refresh_token will be granted automatically. Subsequent requests will require additional user consent. Use false by default; only use true if your server has suffered some failure and lost the user's refresh token. |