/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the sso-oidc-2019-06-10.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
namespace Amazon.SSOOIDC.Model
{
///
/// Container for the parameters to the CreateToken operation.
/// Creates and returns an access token for the authorized client. The access token issued
/// will be used to fetch short-term credentials for the assigned roles in the AWS account.
///
public partial class CreateTokenRequest : AmazonSSOOIDCRequest
{
private string _clientId;
private string _clientSecret;
private string _code;
private string _deviceCode;
private string _grantType;
private string _redirectUri;
private string _refreshToken;
private List _scope = new List();
///
/// Gets and sets the property ClientId.
///
/// The unique identifier string for each client. This value should come from the persisted
/// result of the RegisterClient API.
///
///
[AWSProperty(Required=true)]
public string ClientId
{
get { return this._clientId; }
set { this._clientId = value; }
}
// Check to see if ClientId property is set
internal bool IsSetClientId()
{
return this._clientId != null;
}
///
/// Gets and sets the property ClientSecret.
///
/// A secret string generated for the client. This value should come from the persisted
/// result of the RegisterClient API.
///
///
[AWSProperty(Required=true)]
public string ClientSecret
{
get { return this._clientSecret; }
set { this._clientSecret = value; }
}
// Check to see if ClientSecret property is set
internal bool IsSetClientSecret()
{
return this._clientSecret != null;
}
///
/// Gets and sets the property Code.
///
/// The authorization code received from the authorization service. This parameter is
/// required to perform an authorization grant request to get access to a token.
///
///
public string Code
{
get { return this._code; }
set { this._code = value; }
}
// Check to see if Code property is set
internal bool IsSetCode()
{
return this._code != null;
}
///
/// Gets and sets the property DeviceCode.
///
/// Used only when calling this API for the device code grant type. This short-term code
/// is used to identify this authentication attempt. This should come from an in-memory
/// reference to the result of the StartDeviceAuthorization API.
///
///
public string DeviceCode
{
get { return this._deviceCode; }
set { this._deviceCode = value; }
}
// Check to see if DeviceCode property is set
internal bool IsSetDeviceCode()
{
return this._deviceCode != null;
}
///
/// Gets and sets the property GrantType.
///
/// Supports grant types for the authorization code, refresh token, and device code request.
/// For device code requests, specify the following value:
///
///
///
/// urn:ietf:params:oauth:grant-type:device_code
///
///
///
/// For information about how to obtain the device code, see the StartDeviceAuthorization
/// topic.
///
///
[AWSProperty(Required=true)]
public string GrantType
{
get { return this._grantType; }
set { this._grantType = value; }
}
// Check to see if GrantType property is set
internal bool IsSetGrantType()
{
return this._grantType != null;
}
///
/// Gets and sets the property RedirectUri.
///
/// The location of the application that will receive the authorization code. Users authorize
/// the service to send the request to this location.
///
///
public string RedirectUri
{
get { return this._redirectUri; }
set { this._redirectUri = value; }
}
// Check to see if RedirectUri property is set
internal bool IsSetRedirectUri()
{
return this._redirectUri != null;
}
///
/// Gets and sets the property RefreshToken.
///
/// Currently, refreshToken
is not yet implemented and is not supported.
/// For more information about the features and limitations of the current IAM Identity
/// Center OIDC implementation, see Considerations for Using this Guide in the
/// IAM
/// Identity Center OIDC API Reference.
///
///
///
/// The token used to obtain an access token in the event that the access token is invalid
/// or expired.
///
///
public string RefreshToken
{
get { return this._refreshToken; }
set { this._refreshToken = value; }
}
// Check to see if RefreshToken property is set
internal bool IsSetRefreshToken()
{
return this._refreshToken != null;
}
///
/// Gets and sets the property Scope.
///
/// The list of scopes that is defined by the client. Upon authorization, this list is
/// used to restrict permissions when granting an access token.
///
///
public List Scope
{
get { return this._scope; }
set { this._scope = value; }
}
// Check to see if Scope property is set
internal bool IsSetScope()
{
return this._scope != null && this._scope.Count > 0;
}
///
/// Get the signer to use for this request.
///
/// A signer for this request.
override protected AbstractAWSSigner CreateSigner()
{
return new NullSigner();
}
}
}