Class GoogleAuthorizationCodeRequestUrl
Google-specific implementation of the OAuth 2.0 URL for an authorization web page to allow the end user to authorize the application to access their protected resources and that returns an authorization code, as specified in https://developers.google.com/accounts/docs/OAuth2WebServer.
Inheritance
Inherited Members
Namespace: Google.Apis.Auth.OAuth2.Requests
Assembly: Google.Apis.Auth.dll
Syntax
public class GoogleAuthorizationCodeRequestUrl : AuthorizationCodeRequestUrl
Constructors
GoogleAuthorizationCodeRequestUrl(Uri)
Constructs a new authorization code request with the given authorization server URL. This constructor sets
the AccessType to offline
.
Declaration
public GoogleAuthorizationCodeRequestUrl(Uri authorizationServerUrl)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | authorizationServerUrl |
Properties
AccessType
Gets or sets the access type. Set online
to request on-line access or offline
to request
off-line access or null
for the default behavior. The default value is offline
.
Declaration
[RequestParameter("access_type", RequestParameterType.Query)]
public string AccessType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ApprovalPrompt
Gets or sets prompt for consent behavior auto
to request auto-approval orforce
to force the
approval UI to show, or null
for the default behavior.
Declaration
[RequestParameter("approval_prompt", RequestParameterType.Query)]
[Obsolete("Unused for Google OpenID; use the 'Prompt' property instead.")]
public string ApprovalPrompt { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IncludeGrantedScopes
Gets or sets the include granted scopes to determine if this authorization request should use incremental authorization (https://developers.google.com/+/web/api/rest/oauth#incremental-auth). If true and the authorization request is granted, the authorization will include any previous authorizations granted to this user/application combination for other scopes.
Declaration
[RequestParameter("include_granted_scopes", RequestParameterType.Query)]
public string IncludeGrantedScopes { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Currently unsupported for installed apps.
LoginHint
Gets or sets the login hint. Sets email address
or sub identifier
.
When your application knows which user it is trying to authenticate, it may provide this parameter as a
hint to the Authentication Server. Passing this hint will either pre-fill the email box on the sign-in form
or select the proper multi-login session, thereby simplifying the login flow.
Declaration
[RequestParameter("login_hint", RequestParameterType.Query)]
public string LoginHint { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Nonce
Gets or sets the nonce; a random value generated by your app that enables replay protection. See https://developers.google.com/identity/protocols/OpenIDConnect for more details.
Declaration
[RequestParameter("nonce", RequestParameterType.Query)]
public string Nonce { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Prompt
Gets of sets prompt for consent behaviour.
Value can be null
, "none"
, "consent"
, or "select_account"
.
See OpenIDConnect documentation
for details.
Declaration
[RequestParameter("prompt", RequestParameterType.Query)]
public string Prompt { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UserDefinedQueryParams
Gets or sets a collection of user defined query parameters to facilitate any not explicitly supported by the library which will be included in the resultant authentication URL.
Declaration
[RequestParameter("user_defined_query_params", RequestParameterType.UserDefinedQueries)]
public IEnumerable<KeyValuePair<string, string>> UserDefinedQueryParams { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>> |
Remarks
The name of this parameter is used only for the constructor and will not end up in the resultant query string.