Skip to content

Commit

Permalink
Merge pull request #37 from autodesk-platform-services/DAS-214
Browse files Browse the repository at this point in the history
[DAS 214] - Update Authentication SDK with changes to Documentation.
  • Loading branch information
srivastavarahull authored May 20, 2024
2 parents 444aa6c + 0321dfb commit 2b282ed
Show file tree
Hide file tree
Showing 17 changed files with 1,167 additions and 280 deletions.
379 changes: 322 additions & 57 deletions authentication/source/Http/TokenApi.gen.cs

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions authentication/source/Http/UsersApi.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* APS SDK
*
* The Forge Platform contains an expanding collection of web service components that can be used with Autodesk cloud-based products or your own technologies. Take advantage of Autodesk’s expertise in design and engineering.
* The APS Platform contains an expanding collection of web service components that can be used with Autodesk cloud-based products or your own technologies. Take advantage of Autodesk’s expertise in design and engineering.
*
* Authentication
*
Expand Down Expand Up @@ -40,14 +40,14 @@ namespace Autodesk.Authentication.Http
public interface IUsersApi
{
/// <summary>
/// GET User Info
/// Get User Info
/// </summary>
/// <remarks>
/// Retrieves basic information for the given authenticated user. Only supports 3-legged access tokens.
///Retrieves information about the authenticated user.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="authorization">YOUR_3_LEGGED_ACCESS_TOKEN (optional)</param>
/// <returns>Task of ApiResponse<UserInfo></returns>
/// <returns>Task of ApiResponse&lt;UserInfo&gt;</returns>

System.Threading.Tasks.Task<ApiResponse<UserInfo>> GetUserinfoAsync (string authorization, bool throwOnError = true);
}
Expand Down Expand Up @@ -131,14 +131,14 @@ private void SetHeader(string baseName, object value, HttpRequestMessage req)
public ForgeService Service {get; set;}

/// <summary>
/// GET User Info
/// Get User Info
/// </summary>
/// <remarks>
/// Retrieves basic information for the given authenticated user. Only supports 3-legged access tokens.
///Retrieves information about the authenticated user.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="authorization">YOUR_3_LEGGED_ACCESS_TOKEN (optional)</param>
/// <returns>Task of ApiResponse<UserInfo></returns>
/// <returns>Task of ApiResponse&lt;UserInfo&gt;</returns>

public async System.Threading.Tasks.Task<ApiResponse<UserInfo>> GetUserinfoAsync (string authorization, bool throwOnError = true)
{
Expand Down
35 changes: 21 additions & 14 deletions authentication/source/Model/GrantType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,40 @@
namespace Autodesk.Authentication.Model
{
/// <summary>
/// Enum for Grant types
/// Specifies the grant type you are requesting the code for. Possible values are:
///
///- `client_credentials` - For a 2-legged access token.
///- `authorization_code` - For a 3-legged access token.
///- `refresh_token` - For a refresh token.
/// </summary>
/// <value>Enum for Grant types</value>

///<value>Specifies the grant type you are requesting the code for. Possible values are:
///
///- `client_credentials` - For a 2-legged access token.
///- `authorization_code` - For a 3-legged access token.
///- `refresh_token` - For a refresh token.</value>

[JsonConverter(typeof(StringEnumConverter))]

public enum GrantType
{

/// <summary>
/// Enum Client_credentials for value: Client_credentials
/// Enum Clientcredentials for value: client_credentials
/// </summary>
[EnumMember(Value = "client_credentials")]
Client_credentials,
ClientCredentials,

/// <summary>
/// Enum Authorization_code for value: authorization_code
/// Enum Authorizationcode for value: authorization_code
/// </summary>
[EnumMember(Value = "authorization_code")]
Authorization_code,
AuthorizationCode,

/// <summary>
/// Enum Refresh_token for Refresh_token
/// Enum Refreshtoken for value: refresh_token
/// </summary>
[EnumMember(Value = "refresh_token")]
Refresh_token,

RefreshToken
}

}
41 changes: 26 additions & 15 deletions authentication/source/Model/IntrospectToken.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
namespace Autodesk.Authentication.Model
{
/// <summary>
/// The response body for the introspection of access token.
/// IntrospectToken
/// </summary>
[DataContract]
public partial class IntrospectToken
Expand All @@ -46,42 +46,53 @@ public IntrospectToken()
}

/// <summary>
/// Gets or Sets Active
///`true`: The token is active.
///
///`false`: The token is expired, invalid, or revoked.
/// </summary>
/// <value>
///`true`: The token is active.
///
///`false`: The token is expired, invalid, or revoked.
/// </value>
[DataMember(Name="active", EmitDefaultValue=false)]
public bool? Active { get; set; }

/// <summary>
/// Gets or Sets Scope
///A URL-encoded, space separated list of scopes associated with the token.
/// </summary>
/// <value>
///A URL-encoded, space separated list of scopes associated with the token.
/// </value>
[DataMember(Name="scope", EmitDefaultValue=false)]
public string Scope { get; set; }

/// <summary>
/// Gets or Sets ClientId
///The Client ID of the application associated with the token.
/// </summary>
/// <value>
///The Client ID of the application associated with the token.
/// </value>
[DataMember(Name="client_id", EmitDefaultValue=false)]
public string ClientId { get; set; }

/// <summary>
/// Gets or Sets Exp
///The expiration time of the token, represented as a Unix timestamp.
/// </summary>
/// <value>
///The expiration time of the token, represented as a Unix timestamp.
/// </value>
[DataMember(Name="exp", EmitDefaultValue=false)]
public int? Exp { get; set; }

/// <summary>
/// Gets or Sets Userid
///The ID of the user who authorized the token.
/// </summary>
/// <value>
///The ID of the user who authorized the token.
/// </value>
[DataMember(Name="userid", EmitDefaultValue=false)]
public string UserId { get; set; }


/// <summary>
/// Gets or Sets Token type
/// </summary>
[DataMember(Name="token_type", EmitDefaultValue=false)]
public string TokenType { get; set; }

public string Userid { get; set; }

/// <summary>
/// Returns the string presentation of the object
Expand Down
9 changes: 8 additions & 1 deletion authentication/source/Model/Jwks.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,16 @@ public Jwks()
{
}

/// <summary>
///Gets or Sets Keys
/// </summary>
[DataMember(Name="keys", EmitDefaultValue=false)]
public List<JwksKey> Keys { get; set; }


/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
Expand Down
35 changes: 27 additions & 8 deletions authentication/source/Model/JwksKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,45 +33,64 @@
namespace Autodesk.Authentication.Model
{
/// <summary>
/// Jwks
/// JwksKey
/// </summary>
[DataContract]
public partial class JwksKey
{
/// <summary>
/// Initializes a new instance of the <see cref="Jwks" /> class.
/// Initializes a new instance of the <see cref="JwksKey" /> class.
/// </summary>
public JwksKey()
{
}

/// <summary>
/// Gets or Sets Kid
///The ID of the key. Acts as a unique identifier for a specific key within the JWKS.
/// </summary>
/// <value>
///The ID of the key. Acts as a unique identifier for a specific key within the JWKS.
/// </value>
[DataMember(Name="kid", EmitDefaultValue=false)]
public string Kid { get; set; }

/// <summary>
/// Gets or Sets Kty
///The cryptographic algorithm family used with the key. Currently, always `RSA`.
/// </summary>
/// <value>
///The cryptographic algorithm family used with the key. Currently, always `RSA`.
/// </value>
[DataMember(Name="kty", EmitDefaultValue=false)]
public string Kty { get; set; }

/// <summary>
/// Gets or Sets Use
///The intended use of the public key. Possible values:
///
///- `sig` - Verify the signature on data.
/// </summary>
/// <value>
///The intended use of the public key. Possible values:
///
///- `sig` - Verify the signature on data.
/// </value>
[DataMember(Name="use", EmitDefaultValue=false)]
public string Use { get; set; }

/// <summary>
/// Gets or Sets N
///The RSA modulus value.
/// </summary>
/// <value>
///The RSA modulus value.
/// </value>
[DataMember(Name="n", EmitDefaultValue=false)]
public string N { get; set; }

/// <summary>
/// Gets or Sets E
///The RSA exponent value.
/// </summary>
/// <value>
///The RSA exponent value.
/// </value>
[DataMember(Name="e", EmitDefaultValue=false)]
public string E { get; set; }

Expand Down
Loading

0 comments on commit 2b282ed

Please sign in to comment.