-
Notifications
You must be signed in to change notification settings - Fork 16
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
20 changed files
with
82 additions
and
27 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
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 |
---|---|---|
@@ -1,15 +1,25 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using D2L.CodeStyle.Annotations; | ||
|
||
namespace D2L.Security.OAuth2.Caching { | ||
internal sealed class NullCache : ICache { | ||
internal sealed partial class NullCache : ICache { | ||
|
||
private static readonly CacheResponse NULL_RESPONSE = new CacheResponse( success: false, value: null ); | ||
|
||
Task<CacheResponse> ICache.GetAsync( string key ) => Task.FromResult( NULL_RESPONSE ); | ||
[GenerateSync] | ||
Task<CacheResponse> ICache.GetAsync( string key ) { | ||
return Task.FromResult( NULL_RESPONSE ); | ||
} | ||
|
||
Task ICache.SetAsync( string key, string value, TimeSpan expiry ) => Task.CompletedTask; | ||
[GenerateSync] | ||
Task ICache.SetAsync( string key, string value, TimeSpan expiry ) { | ||
return Task.CompletedTask; | ||
} | ||
|
||
Task ICache.RemoveAsync( string key ) => Task.CompletedTask; | ||
[GenerateSync] | ||
Task ICache.RemoveAsync( string key ) { | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
using System.Threading.Tasks; | ||
using D2L.CodeStyle.Annotations; | ||
|
||
namespace D2L.Security.OAuth2.Keys.Default { | ||
internal interface IPrivateKeyProvider { | ||
internal partial interface IPrivateKeyProvider { | ||
[GenerateSync] | ||
Task<D2LSecurityToken> GetSigningCredentialsAsync(); | ||
} | ||
} |
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
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
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
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
using System.Threading.Tasks; | ||
using D2L.CodeStyle.Annotations; | ||
|
||
namespace D2L.Security.OAuth2.Keys { | ||
/// <summary> | ||
/// An abstraction for signing tokens | ||
/// </summary> | ||
public interface ITokenSigner { | ||
public partial interface ITokenSigner { | ||
|
||
/// <summary> | ||
/// Signs a token | ||
/// </summary> | ||
/// <param name="token">The token to be signed</param> | ||
/// <returns>The raw signed token as a <see cref="string"/></returns> | ||
[GenerateSync] | ||
Task<string> SignAsync( UnsignedToken token ); | ||
} | ||
} |
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
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.