Method Unauthorized
| Improve this Doc View SourceUnauthorized()
Represents a situation where a user does not have valid authentication credentials for the target resource.
Declaration
public static Result Unauthorized()
Returns
| Type | Description |
|---|---|
| Result |
Remarks
Similar to Forbidden(), but specifically for use when authentication is required and has failed or has not yet been provided.
Unauthorized(String)
Represents a situation where a user does not have valid authentication credentials for the target resource.
Declaration
public static Result Unauthorized(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| String | message | An error message. |
Returns
| Type | Description |
|---|---|
| Result |
Remarks
Similar to Forbidden(), but specifically for use when authentication is required and has failed or has not yet been provided.
Unauthorized(IEnumerable<String>)
Represents a situation where a user does not have valid authentication credentials for the target resource.
Declaration
public static Result Unauthorized(IEnumerable<string> errors)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | errors | A collection of string that contains error messages. |
Returns
| Type | Description |
|---|---|
| Result |
Remarks
Similar to Forbidden(), but specifically for use when authentication is required and has failed or has not yet been provided.
Unauthorized(String, IEnumerable<String>)
Represents a situation where a user does not have valid authentication credentials for the target resource.
Declaration
public static Result Unauthorized(string message, IEnumerable<string> errors)
Parameters
| Type | Name | Description |
|---|---|---|
| String | message | A general description of the error. |
| IEnumerable<String> | errors | A collection of errors. |
Returns
| Type | Description |
|---|---|
| Result |
Remarks
Similar to Forbidden(), but specifically for use when authentication is required and has failed or has not yet been provided.