elgalu / pacts

Dockerized Pact Broker with OAuth2 integration

Home Page:http://www.infoq.com/presentations/pact

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerized Pact Broker with OAuth2 support Build Status

This projects starts at https://github.com/bethesque/pact_broker please read those docs first.

Requirements

Usage

Make user ${USER} returns the same user as LDAP/AD one, e.g. elgalu

export SHOST="https://pacts.myteam-test.example.org" \
       OAUTH2_ACCESS_TOKEN_URL="https://token.example.com/access_token" \
       OAUTH2_ACCESS_TOKEN_PARAMS="?realm=/employees"
export OAUTH2_ACCESS_TOKEN_URL_PARAMS="${OAUTH2_ACCESS_TOKEN_URL}${OAUTH2_ACCESS_TOKEN_PARAMS}"
token=$(zign token --user elgalu --url $OAUTH2_ACCESS_TOKEN_URL_PARAMS -n pact)
PACT="{\"provider\": {\"name\": \"prov3\"}, \"consumer\": {\"name\": \"${USER}\"} }"
curl -H "Authorization: Bearer $token" -H 'Content-Type: application/json' -X PUT -d"${PACT}" \
    "$SHOST/pacts/provider/prov3/consumer/${USER}/version/1.0.0"

Now open staging

Docs

About

Dockerized Pact Broker with OAuth2 integration

http://www.infoq.com/presentations/pact

License:MIT License


Languages

Language:Perl 84.7%Language:Shell 9.0%Language:Ruby 5.0%Language:Python 0.7%Language:Makefile 0.6%