Browse Source

Merge pull request #2857 from dexidp/fix-verify

Fix verify
pull/2863/head
Márk Sági-Kazár 3 years ago committed by GitHub
parent
commit
f88ebc48b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .golangci.yml
  2. 4
      Makefile
  3. 12
      flake.lock
  4. 28
      flake.nix
  5. 4
      go.mod
  6. 8
      go.sum
  7. 10
      storage/ent/db/authcode/where.go
  8. 10
      storage/ent/db/authrequest/where.go
  9. 10
      storage/ent/db/connector/where.go
  10. 2
      storage/ent/db/ent.go
  11. 10
      storage/ent/db/keys/where.go
  12. 10
      storage/ent/db/oauth2client/where.go
  13. 10
      storage/ent/db/offlinesession/where.go
  14. 10
      storage/ent/db/refreshtoken/where.go
  15. 4
      storage/ent/db/runtime/runtime.go

8
.golangci.yml

@ -38,8 +38,8 @@ linters:
- nakedret
- nolintlint
- prealloc
- revive
- sqlclosecheck
# - revive
# - sqlclosecheck
- staticcheck
- stylecheck
- unconvert
@ -55,6 +55,9 @@ linters:
# Disable temporarily until everything works with Go 1.18
- typecheck
# Disable temporarily until the following issue is resolved: https://github.com/golangci/golangci-lint/issues/3086
# - sqlclosecheck
# TODO: fix linter errors before enabling
# - exhaustivestruct
# - gochecknoglobals
@ -63,6 +66,7 @@ linters:
# - godot
# - nlreturn
# - noctx
# - revive
# - wrapcheck
# TODO: fix linter errors before enabling (from original config)

4
Makefile

@ -16,8 +16,8 @@ export GOBIN=$(PWD)/bin
LD_FLAGS="-w -X main.version=$(VERSION)"
# Dependency versions
GOLANGCI_VERSION = 1.51.2
GOTESTSUM_VERSION ?= 1.7.0
GOLANGCI_VERSION = 1.52.0
GOTESTSUM_VERSION ?= 1.9.0
PROTOC_VERSION = 3.15.6
PROTOC_GEN_GO_VERSION = 1.26.0

12
flake.lock

@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1662019588,
"narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=",
"lastModified": 1678654296,
"narHash": "sha256-aVfw3ThpY7vkUeF1rFy10NAkpKDS2imj3IakrzT0Occ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2da64a81275b68fdad38af669afeda43d401e94b",
"rev": "5a1dc8acd977ff3dccd1328b7c4a6995429a656b",
"type": "github"
},
"original": {

28
flake.nix

@ -9,19 +9,19 @@
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
buildDeps = with pkgs; [ git go_1_19 gnumake ];
devDeps = with pkgs;
buildDeps ++ [
golangci-lint
gotestsum
protobuf
protoc-gen-go
protoc-gen-go-grpc
kind
];
in
{ devShell = pkgs.mkShell { buildInputs = devDeps; }; }
let
pkgs = nixpkgs.legacyPackages.${system};
buildDeps = with pkgs; [ git go_1_20 gnumake ];
devDeps = with pkgs;
buildDeps ++ [
golangci-lint
gotestsum
protobuf
protoc-gen-go
protoc-gen-go-grpc
kind
];
in
{ devShell = pkgs.mkShell { buildInputs = devDeps; }; }
);
}

4
go.mod

@ -3,7 +3,7 @@ module github.com/dexidp/dex
go 1.20
require (
entgo.io/ent v0.11.9
entgo.io/ent v0.11.10
github.com/AppsFlyer/go-sundheit v0.5.0
github.com/Masterminds/semver v1.5.0
github.com/Masterminds/sprig/v3 v3.2.3
@ -41,7 +41,7 @@ require (
)
require (
ariga.io/atlas v0.9.1 // indirect
ariga.io/atlas v0.9.2-0.20230303073438-03a4779a6338 // indirect
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e // indirect

8
go.sum

@ -1,5 +1,5 @@
ariga.io/atlas v0.9.1 h1:EpoPMnwsQG0vn9c0sYExpwSYtr7bvuSUXzQclU2pMjc=
ariga.io/atlas v0.9.1/go.mod h1:T230JFcENj4ZZzMkZrXFDSkv+2kXkUgpJ5FQQ5hMcKU=
ariga.io/atlas v0.9.2-0.20230303073438-03a4779a6338 h1:8kmSV3mbQKn0niZ/EdE11uhFvFKiW1VlaqVBIYOyahM=
ariga.io/atlas v0.9.2-0.20230303073438-03a4779a6338/go.mod h1:T230JFcENj4ZZzMkZrXFDSkv+2kXkUgpJ5FQQ5hMcKU=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
@ -40,8 +40,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
entgo.io/ent v0.11.9 h1:dbbCkAiPVTRBIJwoZctiSYjB7zxQIBOzVSU5H9VYIQI=
entgo.io/ent v0.11.9/go.mod h1:KWHOcDZn1xk3mz3ipWdKrQpMvwqa/9B69TUuAPP9W6g=
entgo.io/ent v0.11.10 h1:iqn32ybY5HRW3xSAyMNdNKpZhKgMf1Zunsej9yPKUI8=
entgo.io/ent v0.11.10/go.mod h1:mzTZ0trE+jCQw/fnzijbm5Mck/l8Gbg7gC/+L1COyzM=
github.com/AppsFlyer/go-sundheit v0.5.0 h1:/VxpyigCfJrq1r97mn9HPiAB2qrhcTFHwNIIDr15CZM=
github.com/AppsFlyer/go-sundheit v0.5.0/go.mod h1:2ZM0BnfqT/mljBQO224VbL5XH06TgWuQ6Cn+cTtCpTY=
github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e h1:NeAW1fUYUEWhft7pkxDf6WoUvEZJ/uOKsvtpjLnn8MU=

10
storage/ent/db/authcode/where.go

@ -54,6 +54,16 @@ func IDLTE(id string) predicate.AuthCode {
return predicate.AuthCode(sql.FieldLTE(FieldID, id))
}
// IDEqualFold applies the EqualFold predicate on the ID field.
func IDEqualFold(id string) predicate.AuthCode {
return predicate.AuthCode(sql.FieldEqualFold(FieldID, id))
}
// IDContainsFold applies the ContainsFold predicate on the ID field.
func IDContainsFold(id string) predicate.AuthCode {
return predicate.AuthCode(sql.FieldContainsFold(FieldID, id))
}
// ClientID applies equality check predicate on the "client_id" field. It's identical to ClientIDEQ.
func ClientID(v string) predicate.AuthCode {
return predicate.AuthCode(sql.FieldEQ(FieldClientID, v))

10
storage/ent/db/authrequest/where.go

@ -54,6 +54,16 @@ func IDLTE(id string) predicate.AuthRequest {
return predicate.AuthRequest(sql.FieldLTE(FieldID, id))
}
// IDEqualFold applies the EqualFold predicate on the ID field.
func IDEqualFold(id string) predicate.AuthRequest {
return predicate.AuthRequest(sql.FieldEqualFold(FieldID, id))
}
// IDContainsFold applies the ContainsFold predicate on the ID field.
func IDContainsFold(id string) predicate.AuthRequest {
return predicate.AuthRequest(sql.FieldContainsFold(FieldID, id))
}
// ClientID applies equality check predicate on the "client_id" field. It's identical to ClientIDEQ.
func ClientID(v string) predicate.AuthRequest {
return predicate.AuthRequest(sql.FieldEQ(FieldClientID, v))

10
storage/ent/db/connector/where.go

@ -52,6 +52,16 @@ func IDLTE(id string) predicate.Connector {
return predicate.Connector(sql.FieldLTE(FieldID, id))
}
// IDEqualFold applies the EqualFold predicate on the ID field.
func IDEqualFold(id string) predicate.Connector {
return predicate.Connector(sql.FieldEqualFold(FieldID, id))
}
// IDContainsFold applies the ContainsFold predicate on the ID field.
func IDContainsFold(id string) predicate.Connector {
return predicate.Connector(sql.FieldContainsFold(FieldID, id))
}
// Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
func Type(v string) predicate.Connector {
return predicate.Connector(sql.FieldEQ(FieldType, v))

2
storage/ent/db/ent.go

@ -523,7 +523,7 @@ func withHooks[V Value, M any, PM interface {
return exec(ctx)
}
var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
mutationT, ok := m.(PM)
mutationT, ok := any(m).(PM)
if !ok {
return nil, fmt.Errorf("unexpected mutation type %T", m)
}

10
storage/ent/db/keys/where.go

@ -54,6 +54,16 @@ func IDLTE(id string) predicate.Keys {
return predicate.Keys(sql.FieldLTE(FieldID, id))
}
// IDEqualFold applies the EqualFold predicate on the ID field.
func IDEqualFold(id string) predicate.Keys {
return predicate.Keys(sql.FieldEqualFold(FieldID, id))
}
// IDContainsFold applies the ContainsFold predicate on the ID field.
func IDContainsFold(id string) predicate.Keys {
return predicate.Keys(sql.FieldContainsFold(FieldID, id))
}
// NextRotation applies equality check predicate on the "next_rotation" field. It's identical to NextRotationEQ.
func NextRotation(v time.Time) predicate.Keys {
return predicate.Keys(sql.FieldEQ(FieldNextRotation, v))

10
storage/ent/db/oauth2client/where.go

@ -52,6 +52,16 @@ func IDLTE(id string) predicate.OAuth2Client {
return predicate.OAuth2Client(sql.FieldLTE(FieldID, id))
}
// IDEqualFold applies the EqualFold predicate on the ID field.
func IDEqualFold(id string) predicate.OAuth2Client {
return predicate.OAuth2Client(sql.FieldEqualFold(FieldID, id))
}
// IDContainsFold applies the ContainsFold predicate on the ID field.
func IDContainsFold(id string) predicate.OAuth2Client {
return predicate.OAuth2Client(sql.FieldContainsFold(FieldID, id))
}
// Secret applies equality check predicate on the "secret" field. It's identical to SecretEQ.
func Secret(v string) predicate.OAuth2Client {
return predicate.OAuth2Client(sql.FieldEQ(FieldSecret, v))

10
storage/ent/db/offlinesession/where.go

@ -52,6 +52,16 @@ func IDLTE(id string) predicate.OfflineSession {
return predicate.OfflineSession(sql.FieldLTE(FieldID, id))
}
// IDEqualFold applies the EqualFold predicate on the ID field.
func IDEqualFold(id string) predicate.OfflineSession {
return predicate.OfflineSession(sql.FieldEqualFold(FieldID, id))
}
// IDContainsFold applies the ContainsFold predicate on the ID field.
func IDContainsFold(id string) predicate.OfflineSession {
return predicate.OfflineSession(sql.FieldContainsFold(FieldID, id))
}
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserID(v string) predicate.OfflineSession {
return predicate.OfflineSession(sql.FieldEQ(FieldUserID, v))

10
storage/ent/db/refreshtoken/where.go

@ -54,6 +54,16 @@ func IDLTE(id string) predicate.RefreshToken {
return predicate.RefreshToken(sql.FieldLTE(FieldID, id))
}
// IDEqualFold applies the EqualFold predicate on the ID field.
func IDEqualFold(id string) predicate.RefreshToken {
return predicate.RefreshToken(sql.FieldEqualFold(FieldID, id))
}
// IDContainsFold applies the ContainsFold predicate on the ID field.
func IDContainsFold(id string) predicate.RefreshToken {
return predicate.RefreshToken(sql.FieldContainsFold(FieldID, id))
}
// ClientID applies equality check predicate on the "client_id" field. It's identical to ClientIDEQ.
func ClientID(v string) predicate.RefreshToken {
return predicate.RefreshToken(sql.FieldEQ(FieldClientID, v))

4
storage/ent/db/runtime/runtime.go

@ -5,6 +5,6 @@ package runtime
// The schema-stitching logic is generated in github.com/dexidp/dex/storage/ent/db/runtime.go
const (
Version = "v0.11.9" // Version of ent codegen.
Sum = "h1:dbbCkAiPVTRBIJwoZctiSYjB7zxQIBOzVSU5H9VYIQI=" // Sum of ent codegen.
Version = "v0.11.10" // Version of ent codegen.
Sum = "h1:iqn32ybY5HRW3xSAyMNdNKpZhKgMf1Zunsej9yPKUI8=" // Sum of ent codegen.
)

Loading…
Cancel
Save