-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
100 changed files
with
3,638 additions
and
1,166 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: [ 'main' ] | ||
pull_request: | ||
branches: [ 'main' ] | ||
|
||
jobs: | ||
golangci: | ||
name: Run golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.52.2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: [ 'main' ] | ||
pull_request: | ||
branches: [ 'main' ] | ||
jobs: | ||
tests: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: [ '1.17.x', '1.18.x', '1.19.x'] | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: Set up Go ${{ matrix.go }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Go version | ||
run: go version | ||
- name: Run Go tests | ||
run: | | ||
go test -v ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Package main contains an example identity provider implementation. | ||
package main | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package saml | ||
|
||
import ( | ||
"compress/flate" | ||
"fmt" | ||
"io" | ||
) | ||
|
||
const flateUncompressLimit = 10 * 1024 * 1024 // 10MB | ||
|
||
func newSaferFlateReader(r io.Reader) io.ReadCloser { | ||
return &saferFlateReader{r: flate.NewReader(r)} | ||
} | ||
|
||
type saferFlateReader struct { | ||
r io.ReadCloser | ||
count int | ||
} | ||
|
||
func (r *saferFlateReader) Read(p []byte) (n int, err error) { | ||
if r.count+len(p) > flateUncompressLimit { | ||
return 0, fmt.Errorf("flate: uncompress limit exceeded (%d bytes)", flateUncompressLimit) | ||
} | ||
n, err = r.r.Read(p) | ||
r.count += n | ||
return n, err | ||
} | ||
|
||
func (r *saferFlateReader) Close() error { | ||
return r.r.Close() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
module github.com/crewjam/saml | ||
|
||
go 1.13 | ||
go 1.16 | ||
|
||
require ( | ||
github.com/beevik/etree v1.1.0 | ||
github.com/crewjam/httperr v0.2.0 | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5 | ||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible | ||
github.com/google/go-cmp v0.5.5 | ||
github.com/jonboulle/clockwork v0.2.2 // indirect | ||
github.com/kr/pretty v0.3.0 | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/dchest/uniuri v1.2.0 | ||
github.com/golang-jwt/jwt/v4 v4.4.3 | ||
github.com/google/go-cmp v0.5.9 | ||
github.com/kr/pretty v0.3.1 | ||
github.com/mattermost/xml-roundtrip-validator v0.1.0 | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/russellhaering/goxmldsig v1.1.1 | ||
github.com/russellhaering/goxmldsig v1.3.0 | ||
github.com/stretchr/testify v1.8.1 | ||
github.com/zenazn/goji v1.0.1 | ||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 | ||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect | ||
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed | ||
gotest.tools v2.2.0+incompatible | ||
) |
Oops, something went wrong.