Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebasing ory master #4

Merged
merged 35 commits into from
Jan 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0911eb0
handler/oauth2: set expiration time before the access token is genera…
nikita-v Oct 10, 2017
b4b9be5
token/hmac: replace custom logic with copypasta
Oct 25, 2017
7fe1f94
tests: replace nil checks with Error/NoError
Oct 25, 2017
92c73ae
scripts: add format helper scripts
Oct 25, 2017
c87defe
all: format files with goimports
Oct 25, 2017
47fd477
travis: use go-acc and test format
Oct 25, 2017
a2e3a47
history: add 0.12.0 to TOC
Oct 25, 2017
c17222c
travis: update to go 1.9
Oct 25, 2017
4f5df70
travis: add goimports to install section
Oct 25, 2017
65743b4
scripts: fix goimports import path
Oct 25, 2017
ec43e3a
vendor: replace glide with dep
Oct 25, 2017
dd9398e
Add license header to all source files (#222)
arekkas Nov 6, 2017
ff751ee
travis: update go version (#220)
dvrkps Nov 16, 2017
83136a3
handler/oauth2: Client IDs in revokation requests must match now (#226)
arekkas Dec 4, 2017
8961d86
Simplifies error contexts (#227)
arekkas Dec 6, 2017
8d35b66
Exports ErrorToRFC6749Error again (#228)
arekkas Dec 6, 2017
701d850
Makes use of rfcerr in access error endpoint writer explicit
arekkas Dec 6, 2017
d6e0fbd
handler/oauth2: Improves authorization code error handling
Dec 9, 2017
2341dec
handler/oauth2: Adds token revokation on authorize code reuse
Dec 9, 2017
1f9d07d
internal: Updates mocks and mock generation
Dec 9, 2017
392c191
oauth2: Allows client credentials in POST body and solves public clie…
Dec 9, 2017
7ec8d19
Improves error debug messages across the project
Dec 9, 2017
59fc47b
Resolves test issues and reverts auth code revokation patch
Dec 9, 2017
9fc25a8
docs: Updates history.md
Dec 9, 2017
831f56a
Improves test coverage report by removing internal package from it
Dec 9, 2017
87c37c3
Upgrades history.md
Dec 9, 2017
b87ca49
token/jwt: Adds ability to specify acr value natively in id token pay…
Dec 10, 2017
4c7e4e5
Forces use of UTC time zone everywhere
Dec 10, 2017
97fbeb3
Adds ability to catch non-conform OIDC authorizations
Dec 10, 2017
c85b32d
Resolves overriding auth_time with wrong value
Dec 17, 2017
6831f75
Improves http error codes
Dec 17, 2017
95d5f58
Returns the correct error on duplicate auth code use
Dec 17, 2017
2aa8e70
handler/oauth2: Adds offline_access alias for refresh flow
Dec 21, 2017
7216c4f
Adds ability to forward hints and debug messages to clients (#242)
arekkas Dec 23, 2017
1ef3041
compose: Makes SendDebugMessages first class citizen (#243)
arekkas Dec 23, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ language: go
go_import_path: github.com/ory/fosite

go:
- 1.7
- 1.8
- 1.9.x

env:
- GO15VENDOREXPERIMENT=1
- DEP_VERSION="0.3.2"

before_install:
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
- chmod +x $GOPATH/bin/dep

install:
- go get github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/pierrre/gotestcover github.com/Masterminds/glide
- glide install
- dep ensure
- go get github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/pierrre/gotestcover github.com/bradfitz/goimports

script:
- touch ./coverage.tmp
- |
echo 'mode: atomic' > coverage.txt
- |
go list ./... | grep -v /vendor | grep -v /internal | xargs -n1 -I{} sh -c 'go test -race -covermode=atomic -coverprofile=coverage.tmp -coverpkg $(go list ./... | grep -v /vendor | grep -v /internal | tr "\n" ",") {} && tail -n +2 coverage.tmp >> coverage.txt || exit 255' && rm coverage.tmp
- goveralls -coverprofile="coverage.txt"
- goveralls -coverprofile="coverage.txt"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ To make a pull request, you will need a GitHub account; if you are unclear on th

1. Create a feature branch off of `master` so that changes do not get mixed up.
1. [Rebase](https://git-scm.com/book/en/Git-Branching-Rebasing) your local changes against the `master` branch.
1. Run the full project test suite with the `go test $(glide novendor)` (or equivalent) command and confirm that it passes.
1. Run the full project test suite with the `go test ./...` (or equivalent) command and confirm that it passes.
1. Run `gofmt -s` (if the project is written in Go).
1. Accept the Developer's Certificate of Origin on all commits (see above).
1. Ensure that each commit has a subsystem prefix (ex: `controller: `).
Expand Down
135 changes: 135 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"


[[constraint]]
name = "github.com/asaskevich/govalidator"
version = "7.0.0"

[[constraint]]
name = "github.com/dgrijalva/jwt-go"
version = "3.1.0"

[[constraint]]
name = "github.com/golang/mock"
version = "1.0.0"

[[constraint]]
name = "github.com/gorilla/mux"
version = "1.5.0"

[[constraint]]
branch = "master"
name = "github.com/gtank/cryptopasta"

[[constraint]]
branch = "master"
name = "github.com/mohae/deepcopy"

[[constraint]]
name = "github.com/oleiade/reflections"
version = "1.0.0"

[[constraint]]
name = "github.com/parnurzeal/gorequest"
version = "0.2.15"

[[constraint]]
name = "github.com/pborman/uuid"
version = "1.1.0"

[[constraint]]
name = "github.com/pkg/errors"
version = "0.8.0"

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.1.4"

[[constraint]]
branch = "master"
name = "golang.org/x/crypto"

[[constraint]]
branch = "master"
name = "golang.org/x/oauth2"
53 changes: 52 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ bumps (`0.1.0` -> `0.2.0`).
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [0.15.0](#0150)
- [0.14.0](#0140)
- [0.13.0](#0130)
- [Breaking changes](#breaking-changes)
- [0.12.0](#0120)
- [Breaking changes](#breaking-changes-1)
- [Improved cryptographic methods](#improved-cryptographic-methods)
- [0.11.0](#0110)
- [Non-breaking changes](#non-breaking-changes)
- [Storage adapter](#storage-adapter)
Expand All @@ -19,7 +26,7 @@ bumps (`0.1.0` -> `0.2.0`).
- [0.10.0](#0100)
- [0.9.0](#090)
- [0.8.0](#080)
- [Breaking changes](#breaking-changes)
- [Breaking changes](#breaking-changes-2)
- [`ClientManager`](#clientmanager)
- [`OAuth2Provider`](#oauth2provider)
- [0.7.0](#070)
Expand All @@ -32,6 +39,50 @@ bumps (`0.1.0` -> `0.2.0`).

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## 0.16.0

This patch introduces `SendDebugMessagesToClients` to the Fosite struct which enables/disables sending debug information to
clients. Debug information may contain sensitive information as it forwards error messages from, for example, storage
implementations. For this reason, `RevealDebugPayloads` defaults to false. Keep in mind that the information may be
very helpful when specific OAuth 2.0 requests fail and we generally recommend displaying debug information.

Additionally, error keys for JSON changed which caused a new minor version, speicifically
[`statusCode` was changed to `status_code`](https://github.com/ory/fosite/pull/242/files#diff-dd25e0e0a594c3f3592c1c717039b85eR221).


## 0.15.0

This release focuses on improving compatibility with OpenID Connect Certification and better error context.

* Error handling is improved by explicitly adding debug information (e.g. "Token invalid because it was not found
in the database") to the error object. Previously, the original error was prepended which caused weird formatting issues.
* Allows client credentials in POST body at the `/oauth2/token` endpoint. Please note that this method is not recommended
to be used, unless the client making the request is unable to use HTTP Basic Authorization.
* Allows public clients (without secret) to access the `/oauth2/token` endpoint which was previously only possible by adding an arbitrary
secret.

This release has no breaking changes to the external API but due to the nature of the changes, it is released
as a new major version.

## 0.14.0

Improves error contexts. A breaking code changes to the public API was reverted with 0.14.1.

## 0.13.0

### Breaking changes

`glide` was replaced with `dep`.

## 0.12.0

### Breaking changes

#### Improved cryptographic methods

* The minimum required secret length used to generate signatures of access tokens has increased from 16 to 32 byte.
* The algorithm used to generate access tokens using the HMAC-SHA strategy has changed from HMAC-SHA256 to HMAC-SHA512.

## 0.11.0

### Non-breaking changes
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ was out there, so we decided to build it ourselves.

The core public API is almost stable as most changes will only touch the inner workings.

We strongly encourage vendoring fosite using [glide](https://glide.sh) or comparable tools.
We strongly encourage vendoring fosite using [dep](https://github.com/golang/dep) or comparable tools.

## Example

Expand All @@ -69,10 +69,9 @@ of code.
You can run this minimalistic example by doing

```
go get github.com/Masterminds/glide
go get github.com/ory/fosite-example
cd $GOPATH/src/github.com/ory/fosite-example
glide install
dep ensure
go install github.com/ory/fosite-example
fosite-example
```
Expand Down Expand Up @@ -148,7 +147,7 @@ GOPATH environment variable.
go get -d github.com/ory/fosite
```

We recommend to use [Glide](https://github.com/Masterminds/glide) or [Godep](https://github.com/tools/godep) to
We recommend to use [dep](https://github.com/golang/dep) to
mitigate compatibility breaks that come with new api versions.

## Documentation
Expand Down Expand Up @@ -385,10 +384,10 @@ go get -d github.com/ory/fosite
cd $GOPATH/src/github.com/ory/fosite
git status
git remote add myfork <url-to-your-fork>
go test $(glide novendor)
go test ./..
```

Simple, right? Now you are ready to go! Make sure to run `go test $(glide novendor)` often, detecting problems with your code
Simple, right? Now you are ready to go! Make sure to run `go test ./...` often, detecting problems with your code
rather sooner than later. Please read [CONTRIBUTE.md] before creating pull requests and issues.

### Refresh mock objects
Expand Down
Loading