Skip to content

Commit

Permalink
Merge pull request #7391 from abpframework/issue-volo-4907
Browse files Browse the repository at this point in the history
  • Loading branch information
yekalkan committed Jan 26, 2021
2 parents e2a8cdf + 7f8e0aa commit 0d4ab74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public async Task LoginAsync(string userName, string password, string organizati
{
var configuration = new IdentityClientConfiguration(
CliUrls.AccountAbpIo,
"role email abpio abpio_www abpio_commercial offline_access",
"role email abpio abpio_www abpio_commercial offline_access",
"abp-cli",
"1q2w3e*",
OidcConstants.GrantTypes.Password,
Expand All @@ -43,6 +43,7 @@ public async Task LoginAsync(string userName, string password, string organizati
public Task LogoutAsync()
{
FileHelper.DeleteIfExists(CliPaths.AccessToken);
FileHelper.DeleteIfExists(CliPaths.Lic);
return Task.CompletedTask;
}

Expand Down
6 changes: 4 additions & 2 deletions framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Text;

namespace Volo.Abp.Cli
{
Expand All @@ -10,7 +11,8 @@ public static class CliPaths
public static string Root => Path.Combine(AbpRootPath, "cli");
public static string AccessToken => Path.Combine(AbpRootPath, "cli", "access-token.bin");
public static string Build => Path.Combine(AbpRootPath, "build");

public static string Lic => Path.Combine(Path.GetTempPath(), Encoding.ASCII.GetString(new byte[] { 65, 98, 112, 76, 105, 99, 101, 110, 115, 101, 46, 98, 105, 110 }));

private static readonly string AbpRootPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".abp");
}
}
}

0 comments on commit 0d4ab74

Please sign in to comment.