Skip to content

Commit

Permalink
Split source file
Browse files Browse the repository at this point in the history
  • Loading branch information
richardrandak committed Jan 11, 2022
1 parent a7b73ae commit 65da40c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,4 @@ public interface IStandardAuthWorkflow
/// <returns>Success of the revocation</returns>
/// <exception cref="FortnoxApiException">If the Fortnox API returns an error.</exception>
Task<bool> RevokeLegacyTokenAsync(string accessToken);
}

/// <summary>
/// Represents methods of a Fortnox legacy auth workflow.
/// </summary>
[Obsolete("2021-12-09: End-of-life for the static authorization. Use StandardAuth.")]
public interface IStaticTokenAuthWorkflow
{
/// <summary>
/// Use this function to activate new integration and retrieve Access-Token.
/// </summary>
/// <param name="authCode">The API-code (authorization code) given to you by Fortnox.</param>
/// <param name="clientSecret">The Client-Secret code given to you by Fortnox.</param>
/// <returns>The Access-Token to use with Fortnox.</returns>
/// <remarks>Note that an authorization-code can be used only once. Save the retrieved Access-Token in order to use it for FortnoxClient.</remarks>
Task<string> GetTokenAsync(string authCode, string clientSecret);
}
}
20 changes: 20 additions & 0 deletions FortnoxSDK/Auth/IStaticTokenAuthWorkflow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Threading.Tasks;

namespace Fortnox.SDK.Auth;

/// <summary>
/// Represents methods of a Fortnox legacy auth workflow.
/// </summary>
[Obsolete("2021-12-09: End-of-life for the static authorization. Use StandardAuth.")]
public interface IStaticTokenAuthWorkflow
{
/// <summary>
/// Use this function to activate new integration and retrieve Access-Token.
/// </summary>
/// <param name="authCode">The API-code (authorization code) given to you by Fortnox.</param>
/// <param name="clientSecret">The Client-Secret code given to you by Fortnox.</param>
/// <returns>The Access-Token to use with Fortnox.</returns>
/// <remarks>Note that an authorization-code can be used only once. Save the retrieved Access-Token in order to use it for FortnoxClient.</remarks>
Task<string> GetTokenAsync(string authCode, string clientSecret);
}

0 comments on commit 65da40c

Please sign in to comment.