Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"client_name": "",
"redirect_uris": [
"http://localhost:3000/cb"
],
"grant_types": null,
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"client_name": "",
"client_secret": "averylongsecret",
"redirect_uris": [
"http://localhost:3000/cb"
Expand All @@ -8,13 +7,7 @@
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"client_name": "",
"client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM",
"redirect_uris": [
"http://localhost:3000/cb"
Expand All @@ -8,13 +7,7 @@
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"client_name": "",
"client_secret": "averylongsecret",
"redirect_uris": [
"http://localhost:3000/cb"
Expand All @@ -8,13 +7,7 @@
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"client_id": "not-a-uuid",
"client_name": "",
"client_secret": "averylongsecret",
"redirect_uris": [
"http://localhost:3000/cb"
Expand All @@ -9,13 +8,7 @@
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"client_id": "98941dac-f963-4468-8a23-9483b1e04e3c",
"client_name": "",
"client_secret": "not too short",
"redirect_uris": [
"http://localhost:3000/cb"
Expand All @@ -9,13 +8,7 @@
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"client_name": "",
"client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM",
"redirect_uris": [
"http://localhost:3000/cb"
Expand All @@ -8,13 +7,7 @@
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"body": {
"client_name": "",
"redirect_uris": [
"http://localhost:3000/cb"
],
"grant_types": [],
"response_types": [],
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": [],
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"body": {
"client_name": "",
"redirect_uris": [
"http://localhost:3000/cb"
],
"grant_types": [],
"response_types": [],
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": [],
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
"response_types": [],
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": [],
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"body": {
"client_name": "",
"client_secret": "averylongsecret",
"redirect_uris": [
"http://localhost:3000/cb",
Expand All @@ -10,13 +9,7 @@
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"body": {
"client_name": "",
"redirect_uris": [
"http://localhost:3000/cb",
"https://foobar.com"
Expand All @@ -9,13 +8,7 @@
"response_types": null,
"scope": "offline_access offline openid",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "public",
"jwks": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
{
"client_name": "",
"redirect_uris": null,
"grant_types": null,
"response_types": null,
"scope": "",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "",
"jwks": {},
"metadata": {},
"skip_consent": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
{
"client_name": "",
"redirect_uris": null,
"grant_types": null,
"response_types": null,
"scope": "",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "",
"jwks": {},
"metadata": {},
"skip_consent": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
{
"client_name": "",
"client_secret": "01bbf13a-ae3e-44d5-b4b4-dd78137041be",
"redirect_uris": null,
"grant_types": null,
"response_types": null,
"scope": "",
"audience": [],
"owner": "",
"policy_uri": "",
"allowed_cors_origins": [],
"tos_uri": "",
"client_uri": "",
"logo_uri": "",
"contacts": null,
"client_secret_expires_at": 0,
"subject_type": "",
"jwks": {},
"metadata": {},
"skip_consent": false,
Expand Down
18 changes: 9 additions & 9 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Client struct {
//
// The human-readable name of the client to be presented to the
// end-user during authorization.
Name string `json:"client_name" db:"client_name"`
Name string `json:"client_name,omitempty" db:"client_name"`

// OAuth 2.0 Client Secret
//
Expand Down Expand Up @@ -89,7 +89,7 @@ type Client struct {
// can use when requesting access tokens.
//
// Example: scope1 scope-2 scope.3 scope:4
Scope string `json:"scope" db:"scope"`
Scope string `json:"scope,omitempty" db:"scope"`

// OAuth 2.0 Client Audience
//
Expand All @@ -103,14 +103,14 @@ type Client struct {
// OAuth 2.0 Client Owner
//
// Owner is a string identifying the owner of the OAuth 2.0 Client.
Owner string `json:"owner" db:"owner"`
Owner string `json:"owner,omitempty" db:"owner"`

// OAuth 2.0 Client Policy URI
//
// PolicyURI is a URL string that points to a human-readable privacy policy document
// that describes how the deployment organization collects, uses,
// retains, and discloses personal data.
PolicyURI string `json:"policy_uri" db:"policy_uri"`
PolicyURI string `json:"policy_uri,omitempty" db:"policy_uri"`

// OAuth 2.0 Client Allowed CORS Origins
//
Expand All @@ -126,27 +126,27 @@ type Client struct {
// document for the client that describes a contractual relationship
// between the end-user and the client that the end-user accepts when
// authorizing the client.
TermsOfServiceURI string `json:"tos_uri" db:"tos_uri"`
TermsOfServiceURI string `json:"tos_uri,omitempty" db:"tos_uri"`

// OAuth 2.0 Client URI
//
// ClientURI is a URL string of a web page providing information about the client.
// If present, the server SHOULD display this URL to the end-user in
// a clickable fashion.
ClientURI string `json:"client_uri" db:"client_uri"`
ClientURI string `json:"client_uri,omitempty" db:"client_uri"`

// OAuth 2.0 Client Logo URI
//
// A URL string referencing the client's logo.
LogoURI string `json:"logo_uri" db:"logo_uri"`
LogoURI string `json:"logo_uri,omitempty" db:"logo_uri"`

// OAuth 2.0 Client Contact
//
// An array of strings representing ways to contact people responsible
// for this client, typically email addresses.
//
// Example: help@example.org
Contacts sqlxx.StringSliceJSONFormat `json:"contacts" db:"contacts"`
Contacts sqlxx.StringSliceJSONFormat `json:"contacts,omitempty" db:"contacts"`

// OAuth 2.0 Client Secret Expires At
//
Expand All @@ -157,7 +157,7 @@ type Client struct {
//
// The `subject_types_supported` Discovery parameter contains a
// list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.
SubjectType string `json:"subject_type" db:"subject_type" faker:"len=15"`
SubjectType string `json:"subject_type,omitempty" db:"subject_type" faker:"len=15"`

// OpenID Connect Sector Identifier URI
//
Expand Down
Loading
Loading