Merge pull request #2057 from dexidp/codec

Upgrade protobuf in internal codec
This commit is contained in:
Márk Sági-Kazár 2021-03-22 20:24:07 +01:00 committed by GitHub
commit 8e7ce6353f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 237 additions and 109 deletions

View file

@ -1,3 +1,5 @@
OS = $(shell uname | tr A-Z a-z)
PROJ=dex PROJ=dex
ORG_PATH=github.com/dexidp ORG_PATH=github.com/dexidp
REPO_PATH=$(ORG_PATH)/$(PROJ) REPO_PATH=$(ORG_PATH)/$(PROJ)
@ -20,6 +22,9 @@ LD_FLAGS="-w -X $(REPO_PATH)/version.Version=$(VERSION)"
# Dependency versions # Dependency versions
GOLANGCI_VERSION = 1.32.2 GOLANGCI_VERSION = 1.32.2
PROTOC_VERSION = 3.15.6
PROTOC_GEN_GO_VERSION = 1.26.0
build: bin/dex build: bin/dex
bin/dex: bin/dex:
@ -90,21 +95,22 @@ docker-image:
@sudo docker build -t $(DOCKER_IMAGE) . @sudo docker build -t $(DOCKER_IMAGE) .
.PHONY: proto .PHONY: proto
proto: bin/protoc bin/protoc-gen-go proto: bin/protoc-old bin/protoc-gen-go-old
@./bin/protoc --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go api/v2/*.proto @./bin/protoc-old --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old api/v2/*.proto
@cp api/v2/*.proto api/ @cp api/v2/*.proto api/
@./bin/protoc --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go api/*.proto @./bin/protoc-old --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old api/*.proto
@./bin/protoc --go_out=. --plugin=protoc-gen-go=./bin/protoc-gen-go server/internal/*.proto
.PHONY: verify-proto .PHONY: verify-proto
verify-proto: proto verify-proto: proto
@./scripts/git-diff @./scripts/git-diff
bin/protoc: scripts/get-protoc bin/protoc-old: scripts/get-protoc
@./scripts/get-protoc bin/protoc @./scripts/get-protoc bin/protoc-old
bin/protoc-gen-go: bin/protoc-gen-go-old:
@go install -v github.com/golang/protobuf/protoc-gen-go @mkdir -p tmp
@GOBIN=$$PWD/tmp go install -v github.com/golang/protobuf/protoc-gen-go@v1.3.2
@mv tmp/protoc-gen-go bin/protoc-gen-go-old
clean: clean:
@rm -rf bin/ @rm -rf bin/
@ -114,3 +120,26 @@ testall: testrace
FORCE: FORCE:
.PHONY: test testrace testall .PHONY: test testrace testall
.PHONY: proto-internal
proto-internal: bin/protoc bin/protoc-gen-go
@./bin/protoc --go_out=paths=source_relative:. --plugin=protoc-gen-go=./bin/protoc-gen-go server/internal/*.proto
bin/protoc: bin/protoc-${PROTOC_VERSION}
@ln -sf protoc-${PROTOC_VERSION}/bin/protoc bin/protoc
bin/protoc-${PROTOC_VERSION}:
@mkdir -p bin/protoc-${PROTOC_VERSION}
ifeq (${OS}, darwin)
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-osx-x86_64.zip > bin/protoc.zip
endif
ifeq (${OS}, linux)
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip > bin/protoc.zip
endif
unzip bin/protoc.zip -d bin/protoc-${PROTOC_VERSION}
rm bin/protoc.zip
bin/protoc-gen-go: bin/protoc-gen-go-${PROTOC_GEN_GO_VERSION}
@ln -sf protoc-gen-go-${PROTOC_GEN_GO_VERSION} bin/protoc-gen-go
bin/protoc-gen-go-${PROTOC_GEN_GO_VERSION}:
@mkdir -p bin
curl -L https://github.com/protocolbuffers/protobuf-go/releases/download/v${PROTOC_GEN_GO_VERSION}/protoc-gen-go.v${PROTOC_GEN_GO_VERSION}.${OS}.amd64.tar.gz | tar -zOxf - protoc-gen-go > ./bin/protoc-gen-go-${PROTOC_GEN_GO_VERSION} && chmod +x ./bin/protoc-gen-go-${PROTOC_GEN_GO_VERSION}

3
go.mod
View file

@ -12,7 +12,7 @@ require (
github.com/go-ldap/ldap/v3 v3.2.4 github.com/go-ldap/ldap/v3 v3.2.4
github.com/go-sql-driver/mysql v1.5.0 github.com/go-sql-driver/mysql v1.5.0
github.com/gogo/protobuf v1.3.1 // indirect github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/protobuf v1.3.2 github.com/golang/protobuf v1.5.0
github.com/gorilla/handlers v1.5.1 github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0 github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
@ -36,6 +36,7 @@ require (
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3 // indirect golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3 // indirect
google.golang.org/api v0.15.0 google.golang.org/api v0.15.0
google.golang.org/grpc v1.26.0 google.golang.org/grpc v1.26.0
google.golang.org/protobuf v1.26.0
gopkg.in/square/go-jose.v2 v2.5.1 gopkg.in/square/go-jose.v2 v2.5.1
sigs.k8s.io/testing_frameworks v0.1.2 sigs.k8s.io/testing_frameworks v0.1.2
) )

9
go.sum
View file

@ -102,16 +102,18 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU
github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
@ -460,6 +462,9 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

View file

@ -3,7 +3,7 @@ package internal
import ( import (
"encoding/base64" "encoding/base64"
"github.com/golang/protobuf/proto" "google.golang.org/protobuf/proto"
) )
// Marshal converts a protobuf message to a URL legal string. // Marshal converts a protobuf message to a URL legal string.

View file

@ -1,71 +1,79 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.6
// source: server/internal/types.proto // source: server/internal/types.proto
// Package internal holds protobuf types used by the server // Package internal holds protobuf types used by the server.
package internal package internal
import ( import (
fmt "fmt" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
proto "github.com/golang/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
math "math" reflect "reflect"
sync "sync"
) )
// Reference imports to suppress errors if they are not otherwise used. const (
var _ = proto.Marshal // Verify that this generated code is sufficiently up-to-date.
var _ = fmt.Errorf _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
var _ = math.Inf // Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
// This is a compile-time assertion to ensure that this generated file )
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// RefreshToken is a message that holds refresh token data used by dex. // RefreshToken is a message that holds refresh token data used by dex.
type RefreshToken struct { type RefreshToken struct {
RefreshId string `protobuf:"bytes,1,opt,name=refresh_id,json=refreshId,proto3" json:"refresh_id,omitempty"` state protoimpl.MessageState
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` sizeCache protoimpl.SizeCache
XXX_NoUnkeyedLiteral struct{} `json:"-"` unknownFields protoimpl.UnknownFields
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` RefreshId string `protobuf:"bytes,1,opt,name=refresh_id,json=refreshId,proto3" json:"refresh_id,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
} }
func (m *RefreshToken) Reset() { *m = RefreshToken{} } func (x *RefreshToken) Reset() {
func (m *RefreshToken) String() string { return proto.CompactTextString(m) } *x = RefreshToken{}
func (*RefreshToken) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_server_internal_types_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RefreshToken) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RefreshToken) ProtoMessage() {}
func (x *RefreshToken) ProtoReflect() protoreflect.Message {
mi := &file_server_internal_types_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RefreshToken.ProtoReflect.Descriptor instead.
func (*RefreshToken) Descriptor() ([]byte, []int) { func (*RefreshToken) Descriptor() ([]byte, []int) {
return fileDescriptor_c3164bea0c2d595f, []int{0} return file_server_internal_types_proto_rawDescGZIP(), []int{0}
} }
func (m *RefreshToken) XXX_Unmarshal(b []byte) error { func (x *RefreshToken) GetRefreshId() string {
return xxx_messageInfo_RefreshToken.Unmarshal(m, b) if x != nil {
} return x.RefreshId
func (m *RefreshToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RefreshToken.Marshal(b, m, deterministic)
}
func (m *RefreshToken) XXX_Merge(src proto.Message) {
xxx_messageInfo_RefreshToken.Merge(m, src)
}
func (m *RefreshToken) XXX_Size() int {
return xxx_messageInfo_RefreshToken.Size(m)
}
func (m *RefreshToken) XXX_DiscardUnknown() {
xxx_messageInfo_RefreshToken.DiscardUnknown(m)
}
var xxx_messageInfo_RefreshToken proto.InternalMessageInfo
func (m *RefreshToken) GetRefreshId() string {
if m != nil {
return m.RefreshId
} }
return "" return ""
} }
func (m *RefreshToken) GetToken() string { func (x *RefreshToken) GetToken() string {
if m != nil { if x != nil {
return m.Token return x.Token
} }
return "" return ""
} }
@ -73,69 +81,152 @@ func (m *RefreshToken) GetToken() string {
// IDTokenSubject represents both the userID and connID which is returned // IDTokenSubject represents both the userID and connID which is returned
// as the "sub" claim in the ID Token. // as the "sub" claim in the ID Token.
type IDTokenSubject struct { type IDTokenSubject struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` state protoimpl.MessageState
ConnId string `protobuf:"bytes,2,opt,name=conn_id,json=connId,proto3" json:"conn_id,omitempty"` sizeCache protoimpl.SizeCache
XXX_NoUnkeyedLiteral struct{} `json:"-"` unknownFields protoimpl.UnknownFields
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
ConnId string `protobuf:"bytes,2,opt,name=conn_id,json=connId,proto3" json:"conn_id,omitempty"`
} }
func (m *IDTokenSubject) Reset() { *m = IDTokenSubject{} } func (x *IDTokenSubject) Reset() {
func (m *IDTokenSubject) String() string { return proto.CompactTextString(m) } *x = IDTokenSubject{}
func (*IDTokenSubject) ProtoMessage() {} if protoimpl.UnsafeEnabled {
mi := &file_server_internal_types_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IDTokenSubject) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IDTokenSubject) ProtoMessage() {}
func (x *IDTokenSubject) ProtoReflect() protoreflect.Message {
mi := &file_server_internal_types_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IDTokenSubject.ProtoReflect.Descriptor instead.
func (*IDTokenSubject) Descriptor() ([]byte, []int) { func (*IDTokenSubject) Descriptor() ([]byte, []int) {
return fileDescriptor_c3164bea0c2d595f, []int{1} return file_server_internal_types_proto_rawDescGZIP(), []int{1}
} }
func (m *IDTokenSubject) XXX_Unmarshal(b []byte) error { func (x *IDTokenSubject) GetUserId() string {
return xxx_messageInfo_IDTokenSubject.Unmarshal(m, b) if x != nil {
} return x.UserId
func (m *IDTokenSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IDTokenSubject.Marshal(b, m, deterministic)
}
func (m *IDTokenSubject) XXX_Merge(src proto.Message) {
xxx_messageInfo_IDTokenSubject.Merge(m, src)
}
func (m *IDTokenSubject) XXX_Size() int {
return xxx_messageInfo_IDTokenSubject.Size(m)
}
func (m *IDTokenSubject) XXX_DiscardUnknown() {
xxx_messageInfo_IDTokenSubject.DiscardUnknown(m)
}
var xxx_messageInfo_IDTokenSubject proto.InternalMessageInfo
func (m *IDTokenSubject) GetUserId() string {
if m != nil {
return m.UserId
} }
return "" return ""
} }
func (m *IDTokenSubject) GetConnId() string { func (x *IDTokenSubject) GetConnId() string {
if m != nil { if x != nil {
return m.ConnId return x.ConnId
} }
return "" return ""
} }
func init() { var File_server_internal_types_proto protoreflect.FileDescriptor
proto.RegisterType((*RefreshToken)(nil), "internal.RefreshToken")
proto.RegisterType((*IDTokenSubject)(nil), "internal.IDTokenSubject") var file_server_internal_types_proto_rawDesc = []byte{
0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x69,
0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x22, 0x43, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66,
0x72, 0x65, 0x73, 0x68, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x42, 0x0a, 0x0e,
0x49, 0x44, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17,
0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x6e, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x6e, 0x49, 0x64,
0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64,
0x65, 0x78, 0x69, 0x64, 0x70, 0x2f, 0x64, 0x65, 0x78, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
} }
func init() { proto.RegisterFile("server/internal/types.proto", fileDescriptor_c3164bea0c2d595f) } var (
file_server_internal_types_proto_rawDescOnce sync.Once
file_server_internal_types_proto_rawDescData = file_server_internal_types_proto_rawDesc
)
var fileDescriptor_c3164bea0c2d595f = []byte{ func file_server_internal_types_proto_rawDescGZIP() []byte {
// 157 bytes of a gzipped FileDescriptorProto file_server_internal_types_proto_rawDescOnce.Do(func() {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x4e, 0x2d, 0x2a, file_server_internal_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_server_internal_types_proto_rawDescData)
0x4b, 0x2d, 0xd2, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0xca, 0x4b, 0xcc, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, })
0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0x89, 0x2a, 0x39, 0x73, 0xf1, 0x04, return file_server_internal_types_proto_rawDescData
0xa5, 0xa6, 0x15, 0xa5, 0x16, 0x67, 0x84, 0xe4, 0x67, 0xa7, 0xe6, 0x09, 0xc9, 0x72, 0x71, 0x15, }
0x41, 0xf8, 0xf1, 0x99, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x9c, 0x50, 0x11, 0xcf,
0x14, 0x21, 0x11, 0x2e, 0xd6, 0x12, 0x90, 0x3a, 0x09, 0x26, 0xb0, 0x0c, 0x84, 0xa3, 0xe4, 0xc4, var file_server_internal_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
0xc5, 0xe7, 0xe9, 0x02, 0xd6, 0x1f, 0x5c, 0x9a, 0x94, 0x95, 0x9a, 0x5c, 0x22, 0x24, 0xce, 0xc5, var file_server_internal_types_proto_goTypes = []interface{}{
0x5e, 0x5a, 0x9c, 0x5a, 0x84, 0x30, 0x83, 0x0d, 0xc4, 0xf5, 0x4c, 0x01, 0x49, 0x24, 0xe7, 0xe7, (*RefreshToken)(nil), // 0: internal.RefreshToken
0xe5, 0x81, 0x24, 0x20, 0x46, 0xb0, 0x81, 0xb8, 0x9e, 0x29, 0x49, 0x6c, 0x60, 0x97, 0x19, 0x03, (*IDTokenSubject)(nil), // 1: internal.IDTokenSubject
0x02, 0x00, 0x00, 0xff, 0xff, 0x13, 0xfe, 0x01, 0x37, 0xb8, 0x00, 0x00, 0x00, }
var file_server_internal_types_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_server_internal_types_proto_init() }
func file_server_internal_types_proto_init() {
if File_server_internal_types_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_server_internal_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RefreshToken); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_internal_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IDTokenSubject); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_server_internal_types_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_server_internal_types_proto_goTypes,
DependencyIndexes: file_server_internal_types_proto_depIdxs,
MessageInfos: file_server_internal_types_proto_msgTypes,
}.Build()
File_server_internal_types_proto = out.File
file_server_internal_types_proto_rawDesc = nil
file_server_internal_types_proto_goTypes = nil
file_server_internal_types_proto_depIdxs = nil
} }

View file

@ -1,8 +1,10 @@
syntax = "proto3"; syntax = "proto3";
// Package internal holds protobuf types used by the server // Package internal holds protobuf types used by the server.
package internal; package internal;
option go_package = "github.com/dexidp/dex/server/internal";
// RefreshToken is a message that holds refresh token data used by dex. // RefreshToken is a message that holds refresh token data used by dex.
message RefreshToken { message RefreshToken {
string refresh_id = 1; string refresh_id = 1;