def sign_in_client(client_id:, client_secret:, scope:)
      client(issuer).post do |req|
        req.url "/oauth2/#{auth_server_id}/v1/token"
        req.headers['Content-Type']   = 'application/x-www-form-urlencoded'
        req.headers['Authorization']  = 'Basic: ' + Base64.strict_encode64("#{client_id}:#{client_secret}")
        req.body = URI.encode_www_form scope: scope, grant_type: 'client_credentials'
      end
    end
def sign_in_client(client_id:, client_secret:, scope:)
      client(issuer).post do |req|
        req.url "/oauth2/#{auth_server_id}/v1/token"
        req.headers['Content-Type']   = 'application/x-www-form-urlencoded'
        req.headers['Authorization']  = 'Basic: ' + Base64.strict_encode64("#{client_id}:#{client_secret}")
        req.body = URI.encode_www_form scope: scope, grant_type: 'client_credentials'
      end
    end
sign in client to get access_token