mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 20:48:15 +08:00
Added a get authentication test, removed the infrastructure name space as it seemed pointless, started thinking about how to pass claims on with the request
This commit is contained in:
14
src/Ocelot.Library/Errors/Error.cs
Normal file
14
src/Ocelot.Library/Errors/Error.cs
Normal file
@ -0,0 +1,14 @@
|
||||
namespace Ocelot.Library.Errors
|
||||
{
|
||||
public abstract class Error
|
||||
{
|
||||
protected Error(string message, OcelotErrorCode code)
|
||||
{
|
||||
Message = message;
|
||||
Code = code;
|
||||
}
|
||||
|
||||
public string Message { get; private set; }
|
||||
public OcelotErrorCode Code { get; private set; }
|
||||
}
|
||||
}
|
15
src/Ocelot.Library/Errors/OcelotErrorCode.cs
Normal file
15
src/Ocelot.Library/Errors/OcelotErrorCode.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace Ocelot.Library.Errors
|
||||
{
|
||||
public enum OcelotErrorCode
|
||||
{
|
||||
UnauthenticatedError,
|
||||
UnknownError,
|
||||
DownstreamTemplateAlreadyUsedError,
|
||||
UnableToFindDownstreamRouteError,
|
||||
CannotAddDataError,
|
||||
CannotFindDataError,
|
||||
UnableToCompleteRequestError,
|
||||
UnableToCreateAuthenticationHandlerError,
|
||||
UnsupportedAuthenticationProviderError
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user