Skip to content

Commit

Permalink
request: added json and gorethink tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeneas Rekkas (arekkas) committed May 26, 2016
1 parent 49c82bc commit 99c836c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions access_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package fosite
import "time"

type AccessRequest struct {
GrantTypes Arguments
HandledGrantType Arguments
RequestedAt time.Time
GrantTypes Arguments `json:"grantTypes" gorethink:"grantTypes"`
HandledGrantType Arguments `json:"handledGrantType" gorethink:"handledGrantType"`
RequestedAt time.Time `json:"requestedAt" gorethink:"requestedAt"`

Request
}
Expand Down
8 changes: 4 additions & 4 deletions authorize_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

// AuthorizeRequest is an implementation of AuthorizeRequester
type AuthorizeRequest struct {
ResponseTypes Arguments
RedirectURI *url.URL
State string
HandledResponseTypes Arguments
ResponseTypes Arguments `json:"responseTypes" gorethink:"responseTypes"`
RedirectURI *url.URL `json:"redirectUri" gorethink:"redirectUri"`
State string `json:"state" gorethink:"state"`
HandledResponseTypes Arguments `json:"handledResponseTypes" gorethink:"handledResponseTypes"`

Request
}
Expand Down
2 changes: 1 addition & 1 deletion authorize_request_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"net/url"
"testing"

"github.com/go-errors/errors"
"github.com/golang/mock/gomock"
"github.com/ory-am/common/pkg"
. "github.com/ory-am/fosite"
. "github.com/ory-am/fosite/internal"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
"github.com/go-errors/errors"
)

// Should pass
Expand Down
12 changes: 6 additions & 6 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (

// Request is an implementation of Requester
type Request struct {
RequestedAt time.Time
Client Client
Scopes Arguments
GrantedScopes Arguments
Form url.Values
Session interface{}
RequestedAt time.Time `json:"requestedAt" gorethink:"requestedAt"`
Client Client `json:"client" gorethink:"client"`
Scopes Arguments `json:"scopes" gorethink:"scopes"`
GrantedScopes Arguments `json:"grantedScopes" gorethink:"grantedScopes"`
Form url.Values `json:"form" gorethink:"form"`
Session interface{} `json:"session" gorethink:"session"`
}

func NewRequest() *Request {
Expand Down

0 comments on commit 99c836c

Please sign in to comment.