mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-01-24 05:26:55 +02:00
05a4e77c4c
* extract email from id_token for azure provider (#914) * extract email from id_token for azure provider this change fixes a bug when --resource is specified with non-Graph api and the access token destined to --resource is used to call Graph api * fixed typo * refactor GetEmailAddress to EnrichSessionState * make getting email from idtoken best effort and fall back to previous behavior when it's absent * refactor to use jwt package to extract claims * fix lint * refactor unit tests to use test table refactor the get email logic from profile api * addressing feedback * added oidc verifier to azure provider and extract email from id_token if present * fix lint and codeclimate * refactor to use oidc verifier to verify id_token if oidc is configured * fixed UT * addressed comments * minor refactor * addressed feedback * extract email from id_token first and fallback to access token * fallback to access token as well when id_token doesn't have email claim * address feedbacks * updated change log! * switch to docker buildx for multiarch builds * add setup docker buildx action * update docker push to push the multiarch image * make multiarch image have parity with currently produced images by adding linux/armv6 * triaging issue with arm v6 * incorporating feedback * fixing rebase disaster * reset Makefile to blessed state Co-authored-by: Weinong Wang <weinong@outlook.com>
70 lines
1.4 KiB
YAML
70 lines
1.4 KiB
YAML
name: Continuous Integration
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
# - $default-branch
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
# - $default-branch
|
|
|
|
jobs:
|
|
build:
|
|
env:
|
|
COVER: true
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Go 1.16
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.16.x
|
|
id: go
|
|
|
|
- name: Get dependencies
|
|
run: |
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0
|
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
chmod +x ./cc-test-reporter
|
|
|
|
- name: Verify Code Generation
|
|
run: |
|
|
make verify-generate
|
|
|
|
- name: Lint
|
|
run: |
|
|
make lint
|
|
|
|
- name: Build
|
|
run: |
|
|
make build
|
|
|
|
- name: Test
|
|
env:
|
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
|
run: |
|
|
./.github/workflows/test.sh
|
|
|
|
docker:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: crazy-max/ghaction-docker-buildx@v3
|
|
with:
|
|
buildx-version: latest
|
|
qemu-version: latest
|
|
|
|
- name: Docker Build
|
|
run: |
|
|
make docker
|