Skip to content

Commit

Permalink
client: added owner method
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeneas Rekkas (arekkas) committed May 9, 2016
1 parent f524fc2 commit 78012ed
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ type Client interface {

// Returns the client's allowed response types.
GetResponseTypes() Arguments

// Returns the client's owner.
GetOwner() string
}

// DefaultClient is a simple default implementation of the Client interface.
type DefaultClient struct {
ID string `json:"id"`
Name string `json:"name"`
Secret []byte `json:"secret,omitempty"`
RedirectURIs []string `json:"redirectURIs"`
RedirectURIs []string `json:"redirect_uris"`
GrantTypes []string `json:"grant_types"`
ResponseTypes []string `json:"response_types"`
Owner string `json:"owner"`
Expand Down Expand Up @@ -69,3 +72,7 @@ func (c *DefaultClient) GetResponseTypes() Arguments {
}
return Arguments(c.ResponseTypes)
}

func (c *DefaultClient) GetOwner() string {
return c.Owner
}
10 changes: 10 additions & 0 deletions internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ func (_mr *_MockClientRecorder) GetID() *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetID")
}

func (_m *MockClient) GetOwner() string {
ret := _m.ctrl.Call(_m, "GetOwner")
ret0, _ := ret[0].(string)
return ret0
}

func (_mr *_MockClientRecorder) GetOwner() *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetOwner")
}

func (_m *MockClient) GetRedirectURIs() []string {
ret := _m.ctrl.Call(_m, "GetRedirectURIs")
ret0, _ := ret[0].([]string)
Expand Down

0 comments on commit 78012ed

Please sign in to comment.