• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class AuthMessageHandlerBase

Base class for authentication providers message handlers.

Inheritance
System.Object
AuthMessageHandlerBase
BasicAuthMessageHandler
DigestAuthMessageHandler
Namespace: DotNetNuke.Web.Api.Auth
Assembly: DotNetNuke.Web.dll
Syntax
public abstract class AuthMessageHandlerBase : DelegatingHandler

Constructors

| Improve this Doc View Source

AuthMessageHandlerBase(Boolean, Boolean)

Initializes a new instance of the AuthMessageHandlerBase class.

Declaration
protected AuthMessageHandlerBase(bool includeByDefault, bool forceSsl)
Parameters
Type Name Description
System.Boolean includeByDefault

A value indicating whether this handler should be included by default in all API endpoints.

System.Boolean forceSsl

A value indicating whether this handler should enforce SSL usage.

Properties

| Improve this Doc View Source

AuthScheme

Gets the name of the authentication scheme.

Declaration
public abstract string AuthScheme { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

BypassAntiForgeryToken

Gets a value indicating whether this handler should bypass the anti-forgery token check.

Declaration
public virtual bool BypassAntiForgeryToken { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

DefaultInclude

Gets a value indicating whether this handler should be included by default on all API endpoints.

Declaration
public bool DefaultInclude { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

ForceSsl

Gets a value indicating whether this handler should enforce SSL usage on it's endpoints.

Declaration
public bool ForceSsl { get; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

IsXmlHttpRequest(HttpRequestMessage)

Checks if the current request is an XmlHttpRequest.

Declaration
protected static bool IsXmlHttpRequest(HttpRequestMessage request)
Parameters
Type Name Description
HttpRequestMessage request

The HTTP Request.

Returns
Type Description
System.Boolean

A value indicating whether the request is an XmlHttpRequest.

| Improve this Doc View Source

NeedsAuthentication(HttpRequestMessage)

Checks if the current request requires authentication.

Declaration
protected bool NeedsAuthentication(HttpRequestMessage request)
Parameters
Type Name Description
HttpRequestMessage request

The current request.

Returns
Type Description
System.Boolean

A value indication whether the current request needs authentication.

| Improve this Doc View Source

OnInboundRequest(HttpRequestMessage, CancellationToken)

A chance to process inbound requests.

Declaration
public virtual HttpResponseMessage OnInboundRequest(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Type Name Description
HttpRequestMessage request

The request message.

CancellationToken cancellationToken

A cancellationtoken.

Returns
Type Description
HttpResponseMessage

null normally, if a response is returned all inbound processing is terminated and the resposne is returned.

| Improve this Doc View Source

OnOutboundResponse(HttpResponseMessage, CancellationToken)

A change to process outbound responses.

Declaration
public virtual HttpResponseMessage OnOutboundResponse(HttpResponseMessage response, CancellationToken cancellationToken)
Parameters
Type Name Description
HttpResponseMessage response

The response message.

CancellationToken cancellationToken

A cancellationtoken.

Returns
Type Description
HttpResponseMessage

The responsemessage.

| Improve this Doc View Source

SendAsync(HttpRequestMessage, CancellationToken)

Asynchronously sends a response.

Declaration
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Type Name Description
HttpRequestMessage request

The current request.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task<HttpResponseMessage>

An HttpResponseMessage Task.

| Improve this Doc View Source

SetCurrentPrincipal(IPrincipal, HttpRequestMessage)

Sets the current principal for the request.

Declaration
protected static void SetCurrentPrincipal(IPrincipal principal, HttpRequestMessage request)
Parameters
Type Name Description
IPrincipal principal

The principal to set.

HttpRequestMessage request

The current request.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS