Further Refactoring
This commit is contained in:
@@ -119,8 +119,8 @@ func (m *ListAccountsResponse) GetAccounts() []*Account {
|
||||
}
|
||||
|
||||
type Token struct {
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
||||
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
||||
RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
|
||||
Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
|
||||
Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
@@ -157,16 +157,16 @@ func (m *Token) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_Token proto.InternalMessageInfo
|
||||
|
||||
func (m *Token) GetToken() string {
|
||||
func (m *Token) GetAccessToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
return m.AccessToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Token) GetType() string {
|
||||
func (m *Token) GetRefreshToken() string {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
return m.RefreshToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -219,8 +219,7 @@ type Account struct {
|
||||
Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
|
||||
Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
RefreshToken string `protobuf:"bytes,6,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
|
||||
Provider string `protobuf:"bytes,7,opt,name=provider,proto3" json:"provider,omitempty"`
|
||||
Provider string `protobuf:"bytes,6,opt,name=provider,proto3" json:"provider,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -286,13 +285,6 @@ func (m *Account) GetNamespace() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Account) GetRefreshToken() string {
|
||||
if m != nil {
|
||||
return m.RefreshToken
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Account) GetProvider() string {
|
||||
if m != nil {
|
||||
return m.Provider
|
||||
@@ -355,92 +347,6 @@ func (m *Resource) GetEndpoint() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type LoginRequest struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LoginRequest) Reset() { *m = LoginRequest{} }
|
||||
func (m *LoginRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LoginRequest) ProtoMessage() {}
|
||||
func (*LoginRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{5}
|
||||
}
|
||||
|
||||
func (m *LoginRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LoginRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LoginRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LoginRequest.Merge(m, src)
|
||||
}
|
||||
func (m *LoginRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LoginRequest.Size(m)
|
||||
}
|
||||
func (m *LoginRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LoginRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LoginRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *LoginRequest) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LoginRequest) GetSecret() string {
|
||||
if m != nil {
|
||||
return m.Secret
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LoginResponse struct {
|
||||
Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LoginResponse) Reset() { *m = LoginResponse{} }
|
||||
func (m *LoginResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LoginResponse) ProtoMessage() {}
|
||||
func (*LoginResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{6}
|
||||
}
|
||||
|
||||
func (m *LoginResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LoginResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LoginResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LoginResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LoginResponse.Merge(m, src)
|
||||
}
|
||||
func (m *LoginResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_LoginResponse.Size(m)
|
||||
}
|
||||
func (m *LoginResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LoginResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LoginResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *LoginResponse) GetAccount() *Account {
|
||||
if m != nil {
|
||||
return m.Account
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GenerateRequest struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Roles []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"`
|
||||
@@ -458,7 +364,7 @@ func (m *GenerateRequest) Reset() { *m = GenerateRequest{} }
|
||||
func (m *GenerateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GenerateRequest) ProtoMessage() {}
|
||||
func (*GenerateRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{7}
|
||||
return fileDescriptor_11312eec02fd5712, []int{5}
|
||||
}
|
||||
|
||||
func (m *GenerateRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -539,7 +445,7 @@ func (m *GenerateResponse) Reset() { *m = GenerateResponse{} }
|
||||
func (m *GenerateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GenerateResponse) ProtoMessage() {}
|
||||
func (*GenerateResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{8}
|
||||
return fileDescriptor_11312eec02fd5712, []int{6}
|
||||
}
|
||||
|
||||
func (m *GenerateResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -579,7 +485,7 @@ func (m *GrantRequest) Reset() { *m = GrantRequest{} }
|
||||
func (m *GrantRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GrantRequest) ProtoMessage() {}
|
||||
func (*GrantRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{9}
|
||||
return fileDescriptor_11312eec02fd5712, []int{7}
|
||||
}
|
||||
|
||||
func (m *GrantRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -624,7 +530,7 @@ func (m *GrantResponse) Reset() { *m = GrantResponse{} }
|
||||
func (m *GrantResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GrantResponse) ProtoMessage() {}
|
||||
func (*GrantResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{10}
|
||||
return fileDescriptor_11312eec02fd5712, []int{8}
|
||||
}
|
||||
|
||||
func (m *GrantResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -657,7 +563,7 @@ func (m *RevokeRequest) Reset() { *m = RevokeRequest{} }
|
||||
func (m *RevokeRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*RevokeRequest) ProtoMessage() {}
|
||||
func (*RevokeRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{11}
|
||||
return fileDescriptor_11312eec02fd5712, []int{9}
|
||||
}
|
||||
|
||||
func (m *RevokeRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -702,7 +608,7 @@ func (m *RevokeResponse) Reset() { *m = RevokeResponse{} }
|
||||
func (m *RevokeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*RevokeResponse) ProtoMessage() {}
|
||||
func (*RevokeResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{12}
|
||||
return fileDescriptor_11312eec02fd5712, []int{10}
|
||||
}
|
||||
|
||||
func (m *RevokeResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -734,7 +640,7 @@ func (m *InspectRequest) Reset() { *m = InspectRequest{} }
|
||||
func (m *InspectRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*InspectRequest) ProtoMessage() {}
|
||||
func (*InspectRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{13}
|
||||
return fileDescriptor_11312eec02fd5712, []int{11}
|
||||
}
|
||||
|
||||
func (m *InspectRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -773,7 +679,7 @@ func (m *InspectResponse) Reset() { *m = InspectResponse{} }
|
||||
func (m *InspectResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*InspectResponse) ProtoMessage() {}
|
||||
func (*InspectResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{14}
|
||||
return fileDescriptor_11312eec02fd5712, []int{12}
|
||||
}
|
||||
|
||||
func (m *InspectResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -803,8 +709,9 @@ func (m *InspectResponse) GetAccount() *Account {
|
||||
|
||||
type TokenRequest struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
|
||||
TokenExpiry int64 `protobuf:"varint,3,opt,name=token_expiry,json=tokenExpiry,proto3" json:"token_expiry,omitempty"`
|
||||
Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
|
||||
TokenExpiry int64 `protobuf:"varint,4,opt,name=token_expiry,json=tokenExpiry,proto3" json:"token_expiry,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -814,7 +721,7 @@ func (m *TokenRequest) Reset() { *m = TokenRequest{} }
|
||||
func (m *TokenRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*TokenRequest) ProtoMessage() {}
|
||||
func (*TokenRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{15}
|
||||
return fileDescriptor_11312eec02fd5712, []int{13}
|
||||
}
|
||||
|
||||
func (m *TokenRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -842,6 +749,13 @@ func (m *TokenRequest) GetId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *TokenRequest) GetSecret() string {
|
||||
if m != nil {
|
||||
return m.Secret
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *TokenRequest) GetRefreshToken() string {
|
||||
if m != nil {
|
||||
return m.RefreshToken
|
||||
@@ -867,7 +781,7 @@ func (m *TokenResponse) Reset() { *m = TokenResponse{} }
|
||||
func (m *TokenResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*TokenResponse) ProtoMessage() {}
|
||||
func (*TokenResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{16}
|
||||
return fileDescriptor_11312eec02fd5712, []int{14}
|
||||
}
|
||||
|
||||
func (m *TokenResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -909,7 +823,7 @@ func (m *Rule) Reset() { *m = Rule{} }
|
||||
func (m *Rule) String() string { return proto.CompactTextString(m) }
|
||||
func (*Rule) ProtoMessage() {}
|
||||
func (*Rule) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{17}
|
||||
return fileDescriptor_11312eec02fd5712, []int{15}
|
||||
}
|
||||
|
||||
func (m *Rule) XXX_Unmarshal(b []byte) error {
|
||||
@@ -971,7 +885,7 @@ func (m *CreateRequest) Reset() { *m = CreateRequest{} }
|
||||
func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateRequest) ProtoMessage() {}
|
||||
func (*CreateRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{18}
|
||||
return fileDescriptor_11312eec02fd5712, []int{16}
|
||||
}
|
||||
|
||||
func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1023,7 +937,7 @@ func (m *CreateResponse) Reset() { *m = CreateResponse{} }
|
||||
func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateResponse) ProtoMessage() {}
|
||||
func (*CreateResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{19}
|
||||
return fileDescriptor_11312eec02fd5712, []int{17}
|
||||
}
|
||||
|
||||
func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1057,7 +971,7 @@ func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
|
||||
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteRequest) ProtoMessage() {}
|
||||
func (*DeleteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{20}
|
||||
return fileDescriptor_11312eec02fd5712, []int{18}
|
||||
}
|
||||
|
||||
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1109,7 +1023,7 @@ func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
|
||||
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteResponse) ProtoMessage() {}
|
||||
func (*DeleteResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{21}
|
||||
return fileDescriptor_11312eec02fd5712, []int{19}
|
||||
}
|
||||
|
||||
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1140,7 +1054,7 @@ func (m *ListRequest) Reset() { *m = ListRequest{} }
|
||||
func (m *ListRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListRequest) ProtoMessage() {}
|
||||
func (*ListRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{22}
|
||||
return fileDescriptor_11312eec02fd5712, []int{20}
|
||||
}
|
||||
|
||||
func (m *ListRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1172,7 +1086,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} }
|
||||
func (m *ListResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListResponse) ProtoMessage() {}
|
||||
func (*ListResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_11312eec02fd5712, []int{23}
|
||||
return fileDescriptor_11312eec02fd5712, []int{21}
|
||||
}
|
||||
|
||||
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1209,8 +1123,6 @@ func init() {
|
||||
proto.RegisterType((*Account)(nil), "go.micro.auth.Account")
|
||||
proto.RegisterMapType((map[string]string)(nil), "go.micro.auth.Account.MetadataEntry")
|
||||
proto.RegisterType((*Resource)(nil), "go.micro.auth.Resource")
|
||||
proto.RegisterType((*LoginRequest)(nil), "go.micro.auth.LoginRequest")
|
||||
proto.RegisterType((*LoginResponse)(nil), "go.micro.auth.LoginResponse")
|
||||
proto.RegisterType((*GenerateRequest)(nil), "go.micro.auth.GenerateRequest")
|
||||
proto.RegisterMapType((map[string]string)(nil), "go.micro.auth.GenerateRequest.MetadataEntry")
|
||||
proto.RegisterType((*GenerateResponse)(nil), "go.micro.auth.GenerateResponse")
|
||||
@@ -1236,65 +1148,63 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_11312eec02fd5712 = []byte{
|
||||
// 947 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdd, 0x8e, 0xdb, 0x44,
|
||||
0x14, 0x5e, 0xdb, 0x89, 0xe3, 0x3d, 0x89, 0xb3, 0xd1, 0x74, 0xbb, 0x58, 0xe9, 0x0f, 0x8b, 0x8b,
|
||||
0xd0, 0x52, 0xd1, 0x2c, 0x4a, 0x25, 0xfe, 0x2a, 0x21, 0xa2, 0x26, 0x0a, 0x2d, 0x6d, 0x10, 0x56,
|
||||
0x51, 0xb9, 0x41, 0x95, 0xd7, 0x39, 0xdd, 0x35, 0x9b, 0xb5, 0xc3, 0xcc, 0x78, 0xc5, 0x3e, 0x01,
|
||||
0x77, 0xbc, 0x03, 0x12, 0xb7, 0xf0, 0x44, 0x3c, 0x0c, 0x9a, 0xf1, 0x8c, 0xd7, 0x71, 0x9c, 0x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 0xe3, 0x9e, 0x41, 0x00, 0xec, 0xf1, 0x64, 0xf6, 0x64, 0x32,
|
||||
0xee, 0x99, 0xc3, 0x3f, 0x4d, 0x68, 0x8c, 0x32, 0x7e, 0x42, 0x9e, 0x83, 0xa3, 0x27, 0x0f, 0xb9,
|
||||
0xfb, 0xe6, 0x01, 0xdb, 0x7f, 0x77, 0xe3, 0xb9, 0xe2, 0xb3, 0x45, 0x9e, 0x42, 0x4b, 0x35, 0x21,
|
||||
0xb9, 0x53, 0xd1, 0x5e, 0x6d, 0xe2, 0xfe, 0xdd, 0x4d, 0xc7, 0x05, 0xd6, 0x58, 0x7f, 0xad, 0x6e,
|
||||
0xd5, 0x36, 0x83, 0xc2, 0xb9, 0x5d, 0x7f, 0x58, 0x46, 0x91, 0x8f, 0xd8, 0x1a, 0x4a, 0xf9, 0x49,
|
||||
0x5c, 0x43, 0x59, 0x79, 0xf7, 0xfc, 0xad, 0xe1, 0x8f, 0xe0, 0xe8, 0xff, 0x22, 0xf9, 0x0e, 0x1a,
|
||||
0x22, 0x4d, 0xa4, 0xfa, 0xa7, 0xaa, 0xf9, 0x6b, 0xf6, 0xef, 0xbd, 0x51, 0xa7, 0x80, 0xff, 0xdb,
|
||||
0x80, 0xa6, 0x48, 0x27, 0x23, 0x53, 0xb0, 0xf3, 0x02, 0x26, 0x55, 0x97, 0x56, 0x1a, 0xac, 0x7f,
|
||||
0x67, 0xc3, 0x69, 0xc1, 0x7b, 0x0a, 0x76, 0x5e, 0x6d, 0x6b, 0x40, 0x2b, 0xdd, 0xb0, 0x06, 0x54,
|
||||
0x29, 0xd1, 0x2d, 0x32, 0x52, 0x74, 0xfb, 0x35, 0x54, 0x34, 0xc8, 0xad, 0xda, 0x33, 0x0d, 0x71,
|
||||
0x64, 0xcb, 0xef, 0xf9, 0xc3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xd3, 0xdd, 0x57, 0xd9,
|
||||
0x0b, 0x00, 0x00,
|
||||
// 924 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4b, 0x6f, 0xdb, 0x46,
|
||||
0x10, 0x36, 0x49, 0x89, 0xa2, 0x47, 0x0f, 0x0b, 0x1b, 0xc7, 0x25, 0x94, 0x47, 0x1d, 0xa6, 0x28,
|
||||
0xdc, 0xa0, 0x91, 0x0b, 0xe5, 0xd0, 0x47, 0x80, 0xa2, 0x46, 0x24, 0xa8, 0x49, 0x1b, 0x15, 0x25,
|
||||
0x52, 0xa4, 0x97, 0x22, 0xa0, 0xa9, 0xa9, 0xcd, 0x5a, 0x26, 0xd9, 0xdd, 0xa5, 0x51, 0x5f, 0x7a,
|
||||
0xed, 0xad, 0xbf, 0xa2, 0x3f, 0xa7, 0x3f, 0xa1, 0xf7, 0xfe, 0x89, 0x1e, 0x0a, 0xee, 0x83, 0x16,
|
||||
0x29, 0xca, 0x10, 0x5a, 0x1f, 0x72, 0xdb, 0x79, 0xec, 0xec, 0x7c, 0xdf, 0x0c, 0x87, 0x03, 0x1f,
|
||||
0x9f, 0x44, 0xfc, 0x34, 0x3b, 0x1e, 0x86, 0xc9, 0xf9, 0xe1, 0x79, 0x14, 0xd2, 0xe4, 0xf0, 0x24,
|
||||
0x79, 0x2c, 0x0f, 0x41, 0xc6, 0x4f, 0x0f, 0x19, 0xd2, 0x8b, 0x28, 0xc4, 0xc3, 0x94, 0x26, 0x5c,
|
||||
0xaa, 0x86, 0xe2, 0x48, 0xba, 0x27, 0xc9, 0x50, 0xf8, 0x0d, 0x73, 0xa5, 0x77, 0x1b, 0x6e, 0x7d,
|
||||
0x1d, 0x31, 0x7e, 0x14, 0x86, 0x49, 0x16, 0x73, 0xe6, 0xe3, 0xcf, 0x19, 0x32, 0xee, 0xbd, 0x80,
|
||||
0xdd, 0xb2, 0x9a, 0xa5, 0x49, 0xcc, 0x90, 0x8c, 0xc0, 0x09, 0x94, 0xce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5f, 0x0a, 0x9f, 0x99, 0x9f, 0x18,
|
||||
0xde, 0x3f, 0x06, 0xb4, 0x14, 0xc9, 0xa4, 0x07, 0x66, 0x34, 0x57, 0xd7, 0xcc, 0x68, 0x4e, 0x08,
|
||||
0x34, 0xf8, 0x65, 0xaa, 0x2f, 0x89, 0xf3, 0x15, 0x40, 0x6b, 0x19, 0xe0, 0x17, 0x4b, 0x00, 0x1b,
|
||||
0x02, 0xe0, 0x7b, 0xf5, 0x85, 0xdc, 0x0c, 0x62, 0xb3, 0x02, 0x91, 0x0c, 0xc0, 0x49, 0x69, 0x72,
|
||||
0x11, 0xcd, 0x91, 0xba, 0xb6, 0x30, 0x16, 0xf2, 0xff, 0x83, 0x3f, 0x03, 0xc7, 0x47, 0x96, 0x64,
|
||||
0x34, 0xc4, 0x1c, 0x6e, 0xfe, 0xa2, 0xba, 0x28, 0xce, 0xb5, 0x14, 0x0c, 0xc0, 0xc1, 0x78, 0x9e,
|
||||
0x26, 0x51, 0xcc, 0x45, 0xc3, 0x6c, 0xfb, 0x85, 0xec, 0xfd, 0x61, 0xc2, 0xce, 0x14, 0x63, 0xa4,
|
||||
0x01, 0x47, 0xd5, 0xfd, 0x2b, 0xb4, 0x16, 0x14, 0x9a, 0xcb, 0x14, 0x7e, 0xb9, 0x44, 0xa1, 0x25,
|
||||
0x28, 0xfc, 0xb0, 0x42, 0x61, 0x25, 0xee, 0x66, 0x54, 0x36, 0xaa, 0x54, 0xee, 0x81, 0xcd, 0x30,
|
||||
0xa4, 0xa8, 0x5b, 0x57, 0x49, 0x05, 0x52, 0xbb, 0x8c, 0xb4, 0xa0, 0xbd, 0x75, 0x93, 0xb4, 0x8f,
|
||||
0xa1, 0x7f, 0x85, 0x46, 0x0d, 0x83, 0x8f, 0xa0, 0xa5, 0x3e, 0x72, 0x11, 0x63, 0xfd, 0x2c, 0xd0,
|
||||
0x6e, 0xde, 0x6b, 0xe8, 0x4c, 0x69, 0x10, 0x73, 0x4d, 0x34, 0x81,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4, 0x69, 0x0c, 0xee, 0xad, 0xb1, 0x16, 0xb8, 0xa7, 0x60, 0xcb,
|
||||
0x3e, 0x59, 0x09, 0x54, 0xea, 0xe3, 0x95, 0x40, 0x95, 0xe6, 0xda, 0x22, 0x47, 0x0a, 0xee, 0xa0,
|
||||
0x06, 0x8a, 0x0e, 0x72, 0xa7, 0xd6, 0xa6, 0x43, 0x1c, 0xdb, 0x62, 0xdd, 0x7d, 0xf2, 0x6f, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff, 0xd8, 0x6c, 0xbf, 0xd6, 0x29, 0x0b, 0x00, 0x00,
|
||||
}
|
||||
|
@@ -37,7 +37,6 @@ type AuthService interface {
|
||||
Generate(ctx context.Context, in *GenerateRequest, opts ...client.CallOption) (*GenerateResponse, error)
|
||||
Inspect(ctx context.Context, in *InspectRequest, opts ...client.CallOption) (*InspectResponse, error)
|
||||
Token(ctx context.Context, in *TokenRequest, opts ...client.CallOption) (*TokenResponse, error)
|
||||
Login(ctx context.Context, in *LoginRequest, opts ...client.CallOption) (*LoginResponse, error)
|
||||
}
|
||||
|
||||
type authService struct {
|
||||
@@ -82,23 +81,12 @@ func (c *authService) Token(ctx context.Context, in *TokenRequest, opts ...clien
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authService) Login(ctx context.Context, in *LoginRequest, opts ...client.CallOption) (*LoginResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Auth.Login", in)
|
||||
out := new(LoginResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for Auth service
|
||||
|
||||
type AuthHandler interface {
|
||||
Generate(context.Context, *GenerateRequest, *GenerateResponse) error
|
||||
Inspect(context.Context, *InspectRequest, *InspectResponse) error
|
||||
Token(context.Context, *TokenRequest, *TokenResponse) error
|
||||
Login(context.Context, *LoginRequest, *LoginResponse) error
|
||||
}
|
||||
|
||||
func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.HandlerOption) error {
|
||||
@@ -106,7 +94,6 @@ func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.Handl
|
||||
Generate(ctx context.Context, in *GenerateRequest, out *GenerateResponse) error
|
||||
Inspect(ctx context.Context, in *InspectRequest, out *InspectResponse) error
|
||||
Token(ctx context.Context, in *TokenRequest, out *TokenResponse) error
|
||||
Login(ctx context.Context, in *LoginRequest, out *LoginResponse) error
|
||||
}
|
||||
type Auth struct {
|
||||
auth
|
||||
@@ -131,10 +118,6 @@ func (h *authHandler) Token(ctx context.Context, in *TokenRequest, out *TokenRes
|
||||
return h.AuthHandler.Token(ctx, in, out)
|
||||
}
|
||||
|
||||
func (h *authHandler) Login(ctx context.Context, in *LoginRequest, out *LoginResponse) error {
|
||||
return h.AuthHandler.Login(ctx, in, out)
|
||||
}
|
||||
|
||||
// Client API for Accounts service
|
||||
|
||||
type AccountsService interface {
|
||||
|
@@ -6,7 +6,6 @@ service Auth {
|
||||
rpc Generate(GenerateRequest) returns (GenerateResponse) {};
|
||||
rpc Inspect(InspectRequest) returns (InspectResponse) {};
|
||||
rpc Token(TokenRequest) returns (TokenResponse) {};
|
||||
rpc Login(LoginRequest) returns (LoginResponse) {};
|
||||
}
|
||||
|
||||
service Accounts {
|
||||
@@ -27,8 +26,8 @@ message ListAccountsResponse {
|
||||
}
|
||||
|
||||
message Token {
|
||||
string token = 1;
|
||||
string type = 2;
|
||||
string access_token = 1;
|
||||
string refresh_token = 2;
|
||||
int64 created = 3;
|
||||
int64 expiry = 4;
|
||||
string subject = 5;
|
||||
@@ -43,8 +42,7 @@ message Account {
|
||||
repeated string roles = 3;
|
||||
map<string, string> metadata = 4;
|
||||
string namespace = 5;
|
||||
string refresh_token = 6;
|
||||
string provider = 7;
|
||||
string provider = 6;
|
||||
}
|
||||
|
||||
message Resource{
|
||||
@@ -53,15 +51,6 @@ message Resource{
|
||||
string endpoint = 3;
|
||||
}
|
||||
|
||||
message LoginRequest {
|
||||
string id = 1;
|
||||
string secret = 2;
|
||||
}
|
||||
|
||||
message LoginResponse {
|
||||
Account account = 1;
|
||||
}
|
||||
|
||||
message GenerateRequest {
|
||||
string id = 1;
|
||||
repeated string roles = 2;
|
||||
@@ -100,8 +89,9 @@ message InspectResponse {
|
||||
|
||||
message TokenRequest {
|
||||
string id = 1;
|
||||
string refresh_token = 2;
|
||||
int64 token_expiry = 3;
|
||||
string secret = 2;
|
||||
string refresh_token = 3;
|
||||
int64 token_expiry = 4;
|
||||
}
|
||||
|
||||
message TokenResponse {
|
||||
|
Reference in New Issue
Block a user