github.com/avenga/couper@v1.12.2/server/testdata/oauth2/0_retries_couper.hcl (about)

     1  server "api" {
     2    error_file = "./testdata/integration/server_error.html"
     3  
     4    api {
     5      error_file = "./testdata/integration/api_error.json"
     6      endpoint "/" {
     7        proxy {
     8          backend {
     9            origin = "{{.rsOrigin}}"
    10            path   = "/resource"
    11  
    12            oauth2 {
    13              // default
    14              token_endpoint = "{{.asOrigin}}/oauth2"
    15              client_id      = "user"
    16              client_secret  = "pass word"
    17              grant_type     = "client_credentials"
    18              retries        = 0
    19            }
    20          }
    21        }
    22    }
    23  
    24      endpoint "/2nd" {
    25        proxy {
    26          backend {
    27            origin = "{{.rsOrigin}}"
    28            path   = "/resource"
    29  
    30            oauth2 {
    31              client_id     = "user"
    32              client_secret = "pass word"
    33              grant_type    = "client_credentials"
    34              retries       = 0
    35              backend {
    36                origin = "{{.asOrigin}}"
    37                path   = "/oauth2"
    38              }
    39            }
    40          }
    41        }
    42      }
    43  
    44      endpoint "/password" {
    45        proxy {
    46          backend {
    47            origin = "{{.rsOrigin}}"
    48            path   = "/resource"
    49  
    50            oauth2 {
    51              token_endpoint = "{{.asOrigin}}/oauth2"
    52              client_id      = "my_client"
    53              client_secret  = "my_client_secret"
    54              grant_type     = "password"
    55              username       = "user"
    56              password       = "pass word"
    57              retries        = 0
    58            }
    59          }
    60        }
    61      }
    62    }
    63  }
    64  
    65  settings {
    66    no_proxy_from_env = true
    67  }