Skip to content

Instantly share code, notes, and snippets.

@dnno
dnno / http-client.private.env.json
Created April 12, 2023 12:26
http-client.private.env.json
View http-client.private.env.json
"dev": {
"SSLConfiguration": {
"clientCertificate": "dev.pem",
"clientCertificateKey": "dev.key.pem",
"hasCertificatePassphrase": true
}
}
@dnno
dnno / service-request-with-token.http
Created April 12, 2023 12:25
service-request-with-token.http
View service-request-with-token.http
GET https://{{ service-host }}/hello-world
Authorization: Bearer {{ access_token }}
@dnno
dnno / authenticate-with-variable.http
Created April 12, 2023 12:25
authenticate-with-variable.http
View authenticate-with-variable.http
POST https://{{ oauth-host }}/oauth/token?grant_type=client_credentials
Content-Type: application/json
@dnno
dnno / http-client.env.json
Created April 12, 2023 12:24
http-client.env.json
View http-client.env.json
"dev": {
"oauth-host": "dev-oauth.example.com"
}
@dnno
dnno / copy-access-token.js
Last active April 12, 2023 12:27
copy-access-token.js
View copy-access-token.js
> {%
var access_token = response.body['access_token']
client.global.set("access_token", access_token)
%}
@dnno
dnno / auth-response.json
Created April 12, 2023 12:23
auth-response.json
View auth-response.json
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsInZlciI6 ...",
"token_type": "bearer",
"expires_in": 399,
"asc": "generic:anonym",
"exp": 1681292845
...
}
@dnno
dnno / authenticate.http
Created April 12, 2023 12:22
authenticate.http
View authenticate.http
POST https://dev-oauth.example.com/oauth/token?grant_type=client_credentials
Content-Type: application/json
View ssh-filter.sh
#!/bin/bash
# License: WTFPL
# UPPERCASE space-separated country codes to ACCEPT
ALLOW_COUNTRIES="DE"
LOGDENY_FACILITY="authpriv.notice"
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` " 1>&2
exit 0 # return true in case of config issue
@dnno
dnno / gradle.groovy
Created January 2, 2023 13:12
Pact gradle plugin broker connection
View gradle.groovy
pact {
broker {
pactBrokerUrl = "http://localhost:9292"
}
}
@dnno
dnno / gradle.groovy
Last active January 2, 2023 12:23
Gradle pact verification configuration
View gradle.groovy
pact {
publish {
// empty, but needs to be there
}
broker {
pactBrokerUrl = "http://localhost:9292"
}