Search Results for

    Show / Hide Table of Contents

    Class OAuth2Authenticator

    IAuthenticator implementation using OAuth2.

    Inheritance
    object
    OAuth2Authenticator
    Implements
    IAuthenticator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Worldline.Acquiring.Sdk.Authentication
    Assembly: Worldline.Acquiring.Sdk.dll
    Syntax
    public class OAuth2Authenticator : IAuthenticator

    Constructors

    OAuth2Authenticator(CommunicatorConfiguration)

    Constructs a new OAuth2 authenticator.

    Declaration
    public OAuth2Authenticator(CommunicatorConfiguration communicatorConfiguration)
    Parameters
    Type Name Description
    CommunicatorConfiguration communicatorConfiguration

    The configuration object containing the OAuth2 client id, client secret and token URI, connect timeout, and socket timeout. None of these can be null or empty, and the timeout values must be positive.

    Methods

    GetAuthorization(HttpMethod, Uri, IEnumerable<IRequestHeader>)

    Returns a value that can be used for the Authorization header.

    Declaration
    public Task<string> GetAuthorization(HttpMethod httpMethod, Uri resourceUri, IEnumerable<IRequestHeader> requestHeaders)
    Parameters
    Type Name Description
    HttpMethod httpMethod

    HTTP method.

    Uri resourceUri

    Resource URI.

    IEnumerable<IRequestHeader> requestHeaders

    A list of request headers.

    Returns
    Type Description
    Task<string>

    The Authorization header value.

    Remarks

    The list of Request headers may not be modified and may not contain headers with the same name.

    Implements

    IAuthenticator
    In This Article
    Back to top Copyright (c) 2024 Worldline Financial Services (Europe) SA