An implementation of the Open Authorization standard.
v2 url - sends the www.authenticate response
At the moment takes a base64 encoded user/pass combination and checks it against hard coded values. If credentials are valid a bearer token is returned.
TODO
Need other methods of input rather than just base 64 encoded credentials. Need better than a hardcoded username / password combination. Interim configurable user/pass. Medium term password file. Long term full blown OAuth implementation.
curl -iv -H “Authorization: Basic YWRtaW46cGFzc3dvcmQK” https://trow.test:8443/ –cacert certs/ca.crt
curl -iv -H “Authorization: Basic YWRtaW46cGFzc3dvcmQK” https://trow.test:8443/v2 –cacert certs/ca.crt
curl -iv -H “Authorization: Basic YWRtaW46cGFzc3dvcmQK” https://trow.test:8443/login –cacert certs/ca.crt
curl -iv -H “Authorization: Bearer eyJ0eXAiOiJKV1QiLCJraWQiOm51bGwsImFsZyI6IkhTMjU2In0.eyJ1c2VyX2lkIjoiYWRtaW4iLCJjbGllbnRfaWQiOiJkb2NrZXIiLCJzY29wZSI6InB1c2gvcHVsbCIsImlhdCI6MjM0NTIzNDU2LCJleHAiOjM2MDB9.tNgEg1f5a6qvJT5Kxx0Gpw2vh4nSpz5UbMf0Al66k2g” https://trow.test:8443/login –cacert certs/ca.crt
curl -iv -H “Authorization: Basic YWRtaW46cGFzc3dvcmQKbadtoken” https://trow.test:8443/login –cacert certs/ca.crt
curl -iv -H “Authorization: Bearer eyJ0eXAiOiJKV1QiLCJraWQiOm51bGwsImFsZyI6IkhTMjU2In0.eyJ1c2VyX2lkIjoiYWRtaW4iLCJjbGllbnRfaWQiOiJkb2NrZXIiLCJzY29wZSI6InB1c2gvcHVsbCIsImlhdCI6MjM0NTIzNDU2LCJleHAiOjM2MDB9.tNgEg1f5a6qvJT5Kxx0Gpw2vh4nSpz5UbMf0Al66k2gbadtoken” https://trow.test:8443/login –cacert certs/ca.crt
curl “https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/ubuntu:pull”