-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
372 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Htc.Vita.Core.Auth | ||
{ | ||
public static partial class DummyOAuth2 | ||
{ | ||
public partial class DummyAuthorizationCodeClient | ||
{ | ||
/// <inheritdoc /> | ||
protected override Task<AuthorizeResult> OnAuthorizeAsync(CancellationToken cancellationToken) | ||
{ | ||
return Task.Run( | ||
() => OnAuthorize(cancellationToken), | ||
CancellationToken.None | ||
); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override Task<IntrospectTokenResult> OnIntrospectTokenAsync( | ||
OAuth2.ClientTokenInfo token, | ||
CancellationToken cancellationToken) | ||
{ | ||
return Task.Run( | ||
() => OnIntrospectToken( | ||
token, | ||
cancellationToken | ||
), CancellationToken.None | ||
); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override Task<RedeemTokenResult> OnRedeemTokenAsync( | ||
string authorizationCode, | ||
CancellationToken cancellationToken) | ||
{ | ||
return Task.Run( | ||
() => OnRedeemToken( | ||
authorizationCode, | ||
cancellationToken | ||
), CancellationToken.None | ||
); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override Task<RefreshTokenResult> OnRefreshTokenAsync( | ||
OAuth2.ClientTokenInfo token, | ||
CancellationToken cancellationToken) | ||
{ | ||
return Task.Run( | ||
() => OnRefreshToken( | ||
token, | ||
cancellationToken | ||
), CancellationToken.None | ||
); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.