-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
downstream sources tenants tags matching
- Loading branch information
1 parent
005d771
commit 768c6a0
Showing
22 changed files
with
266 additions
and
94 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
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
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
36 changes: 36 additions & 0 deletions
36
OneShelf.Common/OneShelf.Common.Api.WithAuthorization/AnonymousFunctionBase.cs
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,36 @@ | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace OneShelf.Common.Api.WithAuthorization; | ||
|
||
public abstract class AnonymousFunctionBase<TRequest> : FunctionBase<TRequest> | ||
{ | ||
private readonly SecurityContext _securityContext; | ||
|
||
protected AnonymousFunctionBase(ILoggerFactory loggerFactory, SecurityContext securityContext) | ||
: base(loggerFactory) | ||
{ | ||
_securityContext = securityContext; | ||
} | ||
|
||
protected override void OnBeforeExecution() | ||
{ | ||
base.OnBeforeExecution(); | ||
_securityContext.InitAnonymous(); | ||
} | ||
} | ||
|
||
public abstract class AnonymousFunctionBase<TRequest, TResponse> : FunctionBase<TRequest, TResponse> | ||
{ | ||
private readonly SecurityContext _securityContext; | ||
|
||
protected AnonymousFunctionBase(ILoggerFactory loggerFactory, SecurityContext securityContext) : base(loggerFactory) | ||
{ | ||
_securityContext = securityContext; | ||
} | ||
|
||
protected override void OnBeforeExecution() | ||
{ | ||
base.OnBeforeExecution(); | ||
_securityContext.InitAnonymous(); | ||
} | ||
} |
Oops, something went wrong.