PayByBankAuthentication

public enum PayByBankAuthentication

Configuration for authentication to endpoints.

  • Client Credentials Flow.

    Note

    The Client ID is a public identifier of your application. The Client Secret is confidential and should only be used to authenticate your application and make requests to PayByBank’s APIs. For more details, please look at Onboarding documentation.

    Declaration

    Swift

    case clientCredentials(clientID: String, clientSecret: String)

    Parameters

    clientID

    The Client ID is created by Ecospend when your organization is registered with us.

    clientSecret

    The Client Secret is a security key that your administrator should create from the Management Console. This is not visible to or accessible by the Ecospend team. Therefore, you should store it safely.

  • Token-Based Authentication.

    Note

    Token-based authentication is a protocol which allows users to verify their identity, and in return receive a unique access token. During the life of the token, users access the Ecospend Gateway APIs. For more details, please look at Get Access Token documentation.

    Declaration

    Swift

    case token(_: String, type: String = "Bearer")

    Parameters

    accessToken

    The Access Token is required for all subsequent requests to the API. You should keep it safe and secure during its lifetime. The lifetime is configurable.

    type

    Type of token provided. Defaults to “Bearer”