openapi: 3.0.2 info: title: Basware OAUTH2 authentication APIs AccountingDocuments .well-known API description: "**Using OAUTH2.0 authentication:**\n\nGet API access token from api.basware.com/tokens\n1. Using client id and client secret, which you can obtain from Basware. \n2. Specify which APIs can be accessed by using the token e.g. Read only access to vendors API only (these are called scopes). Available scopes are listed at . \n3. Each token has an expiration time, until which it can be used to call APIs.\n\nWhen using OAUTH2 authentication, you need to pass the OAUTH2 authentication token when calling Basware API endpoints. Available Basware API operations are documented at . \n\nSee the Basware API developer site at for more details on API authentication." version: 1.0.0 x-logo: url: https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png tags: - name: .well-known paths: /.well-known/jwks.json: get: tags: - .well-known summary: Provides jwks.json containing metadata to validate token signature. description: Returns signature keys for verifying authenticity of OAUTH2 tokens issued by Basware API. This endpoint is used by Basware to validate tokens passed by API clients in API operation requests using OAUTH2 authentication. It is good practice for the oauth2 tokens (from 'tokens' API) to be validated also by the API client. operationId: get_well_known_token__well_known_jwks_json_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/WellKnownTokenResponse' /.well-known/openid-configuration: get: tags: - .well-known summary: Provides configuration information about the Basware API Authentication Service (IDP). description: This is a discovery endpoint to locate public keys used to validate Basware API access tokens. operationId: get_open_id_configuration__well_known_openid_configuration_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/OpenIdConfigurationResponse' components: schemas: WellKnownTokenKey: properties: e: type: string title: E description: Defines the exponent example: AQAB kid: type: string title: Kid description: Defines the unique identifier for the key example: _A4teDXzLtvFmsyqybIhF2PluHhu7AmreL6iDKt_qKY kty: type: string title: Kty description: Defines the key type example: RSA n: type: string title: N description: Defines the modulus example: 3BrQ9O9qpvQFtFHuUE5DkYztxtHuyZvOXwX-AYc1fhgnM__WIocrQITVRez-OMJUDhFvM2n8c9CrzDxlywnAtsm-wwDnH-aauKSqA5Nd1UxXTFDreRqGcM--ohSb0zFW2XltsADIIuyO5IE6Vy_TX9xOpsb0NfWGG_iumQya0zIM7-4TKaorUMyi-hwVrRa82jIDYCBgJMw2KJp4HlYCxY75LXz-zie7CN4QNXq7omtSvOBfxBEYicFjGQgAFBwIhZfOT8u1N_7dwW7K-2LHtVkdVeX6pEtVvFwz9FRL67rfCyTiTjzPa-1LIEPWtBfVsckru8_TaKyhF5yrQUcFMQ use: type: string title: Use description: Defines how the key was meant to be used example: sig alg: type: string title: Alg description: Defines the algorithm for the key example: RS256 type: object title: WellKnownTokenKey WellKnownTokenResponse: properties: keys: items: $ref: '#/components/schemas/WellKnownTokenKey' type: array title: Keys description: List of public keys available to validate access tokens. type: object title: WellKnownTokenResponse OpenIdConfigurationResponse: properties: issuer: type: string title: Issuer description: Defines token issuer example: https://api.basware.com/ jwks_uri: type: string title: Jwks Uri description: Defines well known endpoint example: https://api.basware.com/.well-known/jwks.json type: object title: OpenIdConfigurationResponse securitySchemes: HTTPBasic: type: http scheme: basic