Skip to content

Commit

Permalink
grant_type password doesn't require client_secret
Browse files Browse the repository at this point in the history
[#167502528]

Signed-off-by: Joshua Casey <[email protected]>
Co-authored-by: Joshua Casey <[email protected]>
  • Loading branch information
Jeremy Morony and joshuatcasey committed Jul 30, 2019
1 parent da1d1fc commit 347645d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ func (c *Client) Validate() error {
return err
}

if err := requireClientSecretForGrantType(c, PASSWORD); err != nil {
return err
}

if err := requireClientSecretForGrantType(c, CLIENTCREDENTIALS); err != nil {
return err
}
Expand Down
9 changes: 0 additions & 9 deletions clients_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,6 @@ func testClientExtra(t *testing.T, when spec.G, it spec.S) {
Expect(err).NotTo(BeNil())
Expect(err.Error()).To(Equal("client_id must be specified in the client definition"))
})

it("requires client_secret", func() {
client := uaa.Client{
ClientID: "myclient",
AuthorizedGrantTypes: []string{"password"},
}
err := client.Validate()
Expect(err.Error()).To(Equal("client_secret must be specified for password grant type"))
})
})
})

Expand Down

0 comments on commit 347645d

Please sign in to comment.