Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement new token interface #13917

Merged
merged 3 commits into from
Apr 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/DynamoCore/Core/IDSDKManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Dynamo.Core
/// <summary>
/// The class to provide auth APIs for IDSDK related methods.
/// </summary>
public class IDSDKManager : IOAuth2AuthProvider
public class IDSDKManager : IOAuth2AuthProvider, IOAuth2AccessTokenProvider
{
/// <summary>
/// Used by the auth provider to request authentication.
Expand Down Expand Up @@ -87,6 +87,10 @@ public void SignRequest(ref RestRequest m, RestClient client)
}
m.AddHeader("Authorization", $"Bearer {IDSDK_GetToken()}");
}
public string GetAccessToken()
{
return IDSDK_GetToken();
}

/// <summary>
/// Checks if the user is logged in and adds the token to request header.
Expand Down