From 958f96b3e562c697e2f9018423fe27a82f9d70d3 Mon Sep 17 00:00:00 2001 From: Declan Teevan Date: Mon, 29 Sep 2025 20:47:30 +0100 Subject: [PATCH] feat: base oauth/oidc method handlers feat: protobuf service interface (`AuthServiceServer`) methods comparison against implemented `AuthService` at compile time --- README.md | 9 +- internal/pkg/protogen/auth/v1/service.pb.go | 1565 +++++++++++++++-- .../pkg/protogen/auth/v1/service.pb.gw.go | 788 +++++++++ .../pkg/protogen/auth/v1/service_grpc.pb.go | 248 ++- internal/pkg/protogen/auth/v1/types.pb.go | 2 +- internal/pkg/protogen/order/v1/types.pb.go | 90 +- internal/svc/auth/auth.go | 31 +- internal/svc/auth/hashing.go | 6 +- schema/openapi/services.swagger.yaml | 506 ++++++ 9 files changed, 3064 insertions(+), 181 deletions(-) diff --git a/README.md b/README.md index af6073a..b0e4479 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,10 @@ An event-driven microservices-based distributed e-commerce example application w ## ๐Ÿ“˜ About -This project was originally built as an experiment with event-driven architecture. But I hope it can future serve as a beneficial demonstration of utilising the architecture and exemplify the implementation of some other miscellaneous microservice patterns. +This project was originally built as an experiment with event-driven architecture. I hope it can serve as a beneficial demonstration of utilising the architecture and exemplify the implementation of some other miscellaneous microservice patterns in a real-world setting. Any ideas, suggestions or direct contributions to better conform with general and evolving industry practices are welcome and will be greatly appreciated, as I'd like for this project to evolve to the stage of being somewhat a reflection of a production-ready enterprise application. -โš ๏ธ The application should be considered in the experimental prototype stage. Breaking changes can be expected between any future commits to this repo, in order to ease the development process and allow for clean refactoring of the project. - ## ๐Ÿ“ Features * Monorepository layout @@ -25,12 +23,13 @@ Any ideas, suggestions or direct contributions to better conform with general an * Transactional outbox pattern with Debezium * API gateway pattern using Envoy * Distributed transactions utilising the saga pattern +* Compliance with common specifications such as OAuth 2.0 ## โš ๏ธ Notice -As this project is licensed under the GNU Affero General Public License v3, [copying, templating or referencing code from this project](https://en.wikipedia.org/wiki/Clean-room_design) may violate international copyright law unless your project is using a compatible open-source license. Please ensure any implementation in your own projects is original and complies with applicable licenses and laws. +As this project is licensed under the GNU Affero General Public License v3, [copying, templating or referencing code from this project](https://en.wikipedia.org/wiki/Clean-room_design) may violate copyright law unless your project is using a compatible open-source license. Please ensure any implementation in your own projects is original and complies with applicable licenses and laws. -In the nature of open-source software, please consider contributing and giving back to the project to help make it better for the greater community, especially if you see it as a useful learning resource. +In the nature of open-source software, please consider contributing and giving back to the project to help make it better for the greater community, especially if you see it as a useful learning resource (as this repo is intended). ## ๐Ÿ—ƒ๏ธ Architecture diff --git a/internal/pkg/protogen/auth/v1/service.pb.go b/internal/pkg/protogen/auth/v1/service.pb.go index 7cad732..b6fc60e 100644 --- a/internal/pkg/protogen/auth/v1/service.pb.go +++ b/internal/pkg/protogen/auth/v1/service.pb.go @@ -1,4 +1,4 @@ -// Copyright (C) 2024 Declan Teevan +// Copyright (C) 2025 Declan Teevan // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by @@ -27,6 +27,7 @@ import ( v11 "github.com/hexolan/stocklet/internal/pkg/protogen/events/v1" _ "google.golang.org/genproto/googleapis/api/annotations" _ "google.golang.org/genproto/googleapis/api/visibility" + postaladdress "google.golang.org/genproto/googleapis/type/postaladdress" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -126,6 +127,952 @@ func (x *GetJwksResponse) GetKeys() []*PublicEcJWK { return nil } +type GetOpenIDProviderConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetOpenIDProviderConfigRequest) Reset() { + *x = GetOpenIDProviderConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOpenIDProviderConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOpenIDProviderConfigRequest) ProtoMessage() {} + +func (x *GetOpenIDProviderConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[2] + 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 GetOpenIDProviderConfigRequest.ProtoReflect.Descriptor instead. +func (*GetOpenIDProviderConfigRequest) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{2} +} + +type GetOpenIDProviderConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` + TokenEndpoint string `protobuf:"bytes,3,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` + UserinfoEndpoint string `protobuf:"bytes,4,opt,name=userinfo_endpoint,json=userinfoEndpoint,proto3" json:"userinfo_endpoint,omitempty"` + JwksUri string `protobuf:"bytes,5,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` + TokenEndpointAuthMethodsSupported []string `protobuf:"bytes,6,rep,name=token_endpoint_auth_methods_supported,json=tokenEndpointAuthMethodsSupported,proto3" json:"token_endpoint_auth_methods_supported,omitempty"` + ScopesSupported []string `protobuf:"bytes,7,rep,name=scopes_supported,json=scopesSupported,proto3" json:"scopes_supported,omitempty"` + ClaimsSupported []string `protobuf:"bytes,8,rep,name=claims_supported,json=claimsSupported,proto3" json:"claims_supported,omitempty"` +} + +func (x *GetOpenIDProviderConfigResponse) Reset() { + *x = GetOpenIDProviderConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOpenIDProviderConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOpenIDProviderConfigResponse) ProtoMessage() {} + +func (x *GetOpenIDProviderConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[3] + 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 GetOpenIDProviderConfigResponse.ProtoReflect.Descriptor instead. +func (*GetOpenIDProviderConfigResponse) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetOpenIDProviderConfigResponse) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *GetOpenIDProviderConfigResponse) GetAuthorizationEndpoint() string { + if x != nil { + return x.AuthorizationEndpoint + } + return "" +} + +func (x *GetOpenIDProviderConfigResponse) GetTokenEndpoint() string { + if x != nil { + return x.TokenEndpoint + } + return "" +} + +func (x *GetOpenIDProviderConfigResponse) GetUserinfoEndpoint() string { + if x != nil { + return x.UserinfoEndpoint + } + return "" +} + +func (x *GetOpenIDProviderConfigResponse) GetJwksUri() string { + if x != nil { + return x.JwksUri + } + return "" +} + +func (x *GetOpenIDProviderConfigResponse) GetTokenEndpointAuthMethodsSupported() []string { + if x != nil { + return x.TokenEndpointAuthMethodsSupported + } + return nil +} + +func (x *GetOpenIDProviderConfigResponse) GetScopesSupported() []string { + if x != nil { + return x.ScopesSupported + } + return nil +} + +func (x *GetOpenIDProviderConfigResponse) GetClaimsSupported() []string { + if x != nil { + return x.ClaimsSupported + } + return nil +} + +type OAuthAuthorizeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResponseType string `protobuf:"bytes,1,opt,name=response_type,json=responseType,proto3" json:"response_type,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + RedirectUri string `protobuf:"bytes,3,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` + Scope string `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"` + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *OAuthAuthorizeRequest) Reset() { + *x = OAuthAuthorizeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthAuthorizeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthAuthorizeRequest) ProtoMessage() {} + +func (x *OAuthAuthorizeRequest) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[4] + 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 OAuthAuthorizeRequest.ProtoReflect.Descriptor instead. +func (*OAuthAuthorizeRequest) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *OAuthAuthorizeRequest) GetResponseType() string { + if x != nil { + return x.ResponseType + } + return "" +} + +func (x *OAuthAuthorizeRequest) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *OAuthAuthorizeRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +func (x *OAuthAuthorizeRequest) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +func (x *OAuthAuthorizeRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +type OAuthAuthorizeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *OAuthAuthorizeResponse) Reset() { + *x = OAuthAuthorizeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthAuthorizeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthAuthorizeResponse) ProtoMessage() {} + +func (x *OAuthAuthorizeResponse) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[5] + 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 OAuthAuthorizeResponse.ProtoReflect.Descriptor instead. +func (*OAuthAuthorizeResponse) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *OAuthAuthorizeResponse) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *OAuthAuthorizeResponse) GetState() string { + if x != nil { + return x.State + } + return "" +} + +type OAuthTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GrantType string `protobuf:"bytes,1,opt,name=grant_type,json=grantType,proto3" json:"grant_type,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + RedirectUri string `protobuf:"bytes,3,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` + ClientId string `protobuf:"bytes,4,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` +} + +func (x *OAuthTokenRequest) Reset() { + *x = OAuthTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthTokenRequest) ProtoMessage() {} + +func (x *OAuthTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[6] + 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 OAuthTokenRequest.ProtoReflect.Descriptor instead. +func (*OAuthTokenRequest) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{6} +} + +func (x *OAuthTokenRequest) GetGrantType() string { + if x != nil { + return x.GrantType + } + return "" +} + +func (x *OAuthTokenRequest) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *OAuthTokenRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +func (x *OAuthTokenRequest) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +type OAuthTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` + RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` + ExpiresIn int64 `protobuf:"varint,4,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` + IdToken string `protobuf:"bytes,5,opt,name=id_token,json=idToken,proto3" json:"id_token,omitempty"` +} + +func (x *OAuthTokenResponse) Reset() { + *x = OAuthTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthTokenResponse) ProtoMessage() {} + +func (x *OAuthTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[7] + 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 OAuthTokenResponse.ProtoReflect.Descriptor instead. +func (*OAuthTokenResponse) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{7} +} + +func (x *OAuthTokenResponse) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *OAuthTokenResponse) GetTokenType() string { + if x != nil { + return x.TokenType + } + return "" +} + +func (x *OAuthTokenResponse) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +func (x *OAuthTokenResponse) GetExpiresIn() int64 { + if x != nil { + return x.ExpiresIn + } + return 0 +} + +func (x *OAuthTokenResponse) GetIdToken() string { + if x != nil { + return x.IdToken + } + return "" +} + +type OAuthTokenRevocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + TokenTypeHint string `protobuf:"bytes,2,opt,name=token_type_hint,json=tokenTypeHint,proto3" json:"token_type_hint,omitempty"` +} + +func (x *OAuthTokenRevocationRequest) Reset() { + *x = OAuthTokenRevocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthTokenRevocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthTokenRevocationRequest) ProtoMessage() {} + +func (x *OAuthTokenRevocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[8] + 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 OAuthTokenRevocationRequest.ProtoReflect.Descriptor instead. +func (*OAuthTokenRevocationRequest) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{8} +} + +func (x *OAuthTokenRevocationRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *OAuthTokenRevocationRequest) GetTokenTypeHint() string { + if x != nil { + return x.TokenTypeHint + } + return "" +} + +type OAuthTokenRevocationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OAuthTokenRevocationResponse) Reset() { + *x = OAuthTokenRevocationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthTokenRevocationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthTokenRevocationResponse) ProtoMessage() {} + +func (x *OAuthTokenRevocationResponse) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[9] + 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 OAuthTokenRevocationResponse.ProtoReflect.Descriptor instead. +func (*OAuthTokenRevocationResponse) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{9} +} + +type OAuthTokenIntrospectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + TokenTypeHint string `protobuf:"bytes,2,opt,name=token_type_hint,json=tokenTypeHint,proto3" json:"token_type_hint,omitempty"` +} + +func (x *OAuthTokenIntrospectionRequest) Reset() { + *x = OAuthTokenIntrospectionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthTokenIntrospectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthTokenIntrospectionRequest) ProtoMessage() {} + +func (x *OAuthTokenIntrospectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[10] + 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 OAuthTokenIntrospectionRequest.ProtoReflect.Descriptor instead. +func (*OAuthTokenIntrospectionRequest) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{10} +} + +func (x *OAuthTokenIntrospectionRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *OAuthTokenIntrospectionRequest) GetTokenTypeHint() string { + if x != nil { + return x.TokenTypeHint + } + return "" +} + +type OAuthTokenIntrospectionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"` + Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` + ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` + TokenType string `protobuf:"bytes,5,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` + Exp int64 `protobuf:"varint,6,opt,name=exp,proto3" json:"exp,omitempty"` + Iat int64 `protobuf:"varint,7,opt,name=iat,proto3" json:"iat,omitempty"` + Nbf int64 `protobuf:"varint,8,opt,name=nbf,proto3" json:"nbf,omitempty"` + Sub string `protobuf:"bytes,9,opt,name=sub,proto3" json:"sub,omitempty"` + Aud string `protobuf:"bytes,10,opt,name=aud,proto3" json:"aud,omitempty"` + Iss string `protobuf:"bytes,11,opt,name=iss,proto3" json:"iss,omitempty"` + Jti string `protobuf:"bytes,12,opt,name=jti,proto3" json:"jti,omitempty"` +} + +func (x *OAuthTokenIntrospectionResponse) Reset() { + *x = OAuthTokenIntrospectionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthTokenIntrospectionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthTokenIntrospectionResponse) ProtoMessage() {} + +func (x *OAuthTokenIntrospectionResponse) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[11] + 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 OAuthTokenIntrospectionResponse.ProtoReflect.Descriptor instead. +func (*OAuthTokenIntrospectionResponse) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{11} +} + +func (x *OAuthTokenIntrospectionResponse) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *OAuthTokenIntrospectionResponse) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +func (x *OAuthTokenIntrospectionResponse) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *OAuthTokenIntrospectionResponse) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *OAuthTokenIntrospectionResponse) GetTokenType() string { + if x != nil { + return x.TokenType + } + return "" +} + +func (x *OAuthTokenIntrospectionResponse) GetExp() int64 { + if x != nil { + return x.Exp + } + return 0 +} + +func (x *OAuthTokenIntrospectionResponse) GetIat() int64 { + if x != nil { + return x.Iat + } + return 0 +} + +func (x *OAuthTokenIntrospectionResponse) GetNbf() int64 { + if x != nil { + return x.Nbf + } + return 0 +} + +func (x *OAuthTokenIntrospectionResponse) GetSub() string { + if x != nil { + return x.Sub + } + return "" +} + +func (x *OAuthTokenIntrospectionResponse) GetAud() string { + if x != nil { + return x.Aud + } + return "" +} + +func (x *OAuthTokenIntrospectionResponse) GetIss() string { + if x != nil { + return x.Iss + } + return "" +} + +func (x *OAuthTokenIntrospectionResponse) GetJti() string { + if x != nil { + return x.Jti + } + return "" +} + +type OpenIDUserInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OpenIDUserInfoRequest) Reset() { + *x = OpenIDUserInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenIDUserInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenIDUserInfoRequest) ProtoMessage() {} + +func (x *OpenIDUserInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[12] + 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 OpenIDUserInfoRequest.ProtoReflect.Descriptor instead. +func (*OpenIDUserInfoRequest) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{12} +} + +// https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims +type OpenIDUserInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + FamilyName string `protobuf:"bytes,3,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"` + GivenName string `protobuf:"bytes,4,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"` + MiddleName string `protobuf:"bytes,5,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` + Nickname string `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname,omitempty"` + PreferredUsername string `protobuf:"bytes,7,opt,name=preferred_username,json=preferredUsername,proto3" json:"preferred_username,omitempty"` + Profile string `protobuf:"bytes,8,opt,name=profile,proto3" json:"profile,omitempty"` + Picture string `protobuf:"bytes,9,opt,name=picture,proto3" json:"picture,omitempty"` + Website string `protobuf:"bytes,10,opt,name=website,proto3" json:"website,omitempty"` + Email string `protobuf:"bytes,11,opt,name=email,proto3" json:"email,omitempty"` + EmailVerified bool `protobuf:"varint,12,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"` + Gender string `protobuf:"bytes,13,opt,name=gender,proto3" json:"gender,omitempty"` + Birthdate string `protobuf:"bytes,14,opt,name=birthdate,proto3" json:"birthdate,omitempty"` + Zoneinfo string `protobuf:"bytes,15,opt,name=zoneinfo,proto3" json:"zoneinfo,omitempty"` + Locale string `protobuf:"bytes,16,opt,name=locale,proto3" json:"locale,omitempty"` + PhoneNumber string `protobuf:"bytes,17,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + PhoneNumberVerified bool `protobuf:"varint,18,opt,name=phone_number_verified,json=phoneNumberVerified,proto3" json:"phone_number_verified,omitempty"` + Address *postaladdress.PostalAddress `protobuf:"bytes,19,opt,name=address,proto3" json:"address,omitempty"` + UpdatedAt int64 `protobuf:"varint,20,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *OpenIDUserInfoResponse) Reset() { + *x = OpenIDUserInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenIDUserInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenIDUserInfoResponse) ProtoMessage() {} + +func (x *OpenIDUserInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_stocklet_auth_v1_service_proto_msgTypes[13] + 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 OpenIDUserInfoResponse.ProtoReflect.Descriptor instead. +func (*OpenIDUserInfoResponse) Descriptor() ([]byte, []int) { + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{13} +} + +func (x *OpenIDUserInfoResponse) GetSub() string { + if x != nil { + return x.Sub + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetFamilyName() string { + if x != nil { + return x.FamilyName + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetGivenName() string { + if x != nil { + return x.GivenName + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetMiddleName() string { + if x != nil { + return x.MiddleName + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetPreferredUsername() string { + if x != nil { + return x.PreferredUsername + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetProfile() string { + if x != nil { + return x.Profile + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetPicture() string { + if x != nil { + return x.Picture + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetWebsite() string { + if x != nil { + return x.Website + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetEmailVerified() bool { + if x != nil { + return x.EmailVerified + } + return false +} + +func (x *OpenIDUserInfoResponse) GetGender() string { + if x != nil { + return x.Gender + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetBirthdate() string { + if x != nil { + return x.Birthdate + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetZoneinfo() string { + if x != nil { + return x.Zoneinfo + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetLocale() string { + if x != nil { + return x.Locale + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *OpenIDUserInfoResponse) GetPhoneNumberVerified() bool { + if x != nil { + return x.PhoneNumberVerified + } + return false +} + +func (x *OpenIDUserInfoResponse) GetAddress() *postaladdress.PostalAddress { + if x != nil { + return x.Address + } + return nil +} + +func (x *OpenIDUserInfoResponse) GetUpdatedAt() int64 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + type LoginPasswordRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -138,7 +1085,7 @@ type LoginPasswordRequest struct { func (x *LoginPasswordRequest) Reset() { *x = LoginPasswordRequest{} if protoimpl.UnsafeEnabled { - mi := &file_stocklet_auth_v1_service_proto_msgTypes[2] + mi := &file_stocklet_auth_v1_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -151,7 +1098,7 @@ func (x *LoginPasswordRequest) String() string { func (*LoginPasswordRequest) ProtoMessage() {} func (x *LoginPasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_stocklet_auth_v1_service_proto_msgTypes[2] + mi := &file_stocklet_auth_v1_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -164,7 +1111,7 @@ func (x *LoginPasswordRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginPasswordRequest.ProtoReflect.Descriptor instead. func (*LoginPasswordRequest) Descriptor() ([]byte, []int) { - return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{2} + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{14} } func (x *LoginPasswordRequest) GetUserId() string { @@ -193,7 +1140,7 @@ type LoginPasswordResponse struct { func (x *LoginPasswordResponse) Reset() { *x = LoginPasswordResponse{} if protoimpl.UnsafeEnabled { - mi := &file_stocklet_auth_v1_service_proto_msgTypes[3] + mi := &file_stocklet_auth_v1_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -206,7 +1153,7 @@ func (x *LoginPasswordResponse) String() string { func (*LoginPasswordResponse) ProtoMessage() {} func (x *LoginPasswordResponse) ProtoReflect() protoreflect.Message { - mi := &file_stocklet_auth_v1_service_proto_msgTypes[3] + mi := &file_stocklet_auth_v1_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -219,7 +1166,7 @@ func (x *LoginPasswordResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginPasswordResponse.ProtoReflect.Descriptor instead. func (*LoginPasswordResponse) Descriptor() ([]byte, []int) { - return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{3} + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{15} } func (x *LoginPasswordResponse) GetDetail() string { @@ -248,7 +1195,7 @@ type SetPasswordRequest struct { func (x *SetPasswordRequest) Reset() { *x = SetPasswordRequest{} if protoimpl.UnsafeEnabled { - mi := &file_stocklet_auth_v1_service_proto_msgTypes[4] + mi := &file_stocklet_auth_v1_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -261,7 +1208,7 @@ func (x *SetPasswordRequest) String() string { func (*SetPasswordRequest) ProtoMessage() {} func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_stocklet_auth_v1_service_proto_msgTypes[4] + mi := &file_stocklet_auth_v1_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -274,7 +1221,7 @@ func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead. func (*SetPasswordRequest) Descriptor() ([]byte, []int) { - return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{4} + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{16} } func (x *SetPasswordRequest) GetUserId() string { @@ -302,7 +1249,7 @@ type SetPasswordResponse struct { func (x *SetPasswordResponse) Reset() { *x = SetPasswordResponse{} if protoimpl.UnsafeEnabled { - mi := &file_stocklet_auth_v1_service_proto_msgTypes[5] + mi := &file_stocklet_auth_v1_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -315,7 +1262,7 @@ func (x *SetPasswordResponse) String() string { func (*SetPasswordResponse) ProtoMessage() {} func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message { - mi := &file_stocklet_auth_v1_service_proto_msgTypes[5] + mi := &file_stocklet_auth_v1_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -328,7 +1275,7 @@ func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPasswordResponse.ProtoReflect.Descriptor instead. func (*SetPasswordResponse) Descriptor() ([]byte, []int) { - return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{5} + return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{17} } func (x *SetPasswordResponse) GetDetail() string { @@ -353,82 +1300,284 @@ var file_stocklet_auth_v1_service_proto_rawDesc = []byte{ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, - 0x65, 0x74, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x74, 0x6f, 0x63, 0x6b, - 0x6c, 0x65, 0x74, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4a, - 0x77, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x4a, 0x77, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, - 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x74, - 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x63, 0x4a, 0x57, 0x4b, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x22, 0x65, 0x0a, 0x14, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xe0, 0x41, 0x02, 0xba, 0x48, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, - 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0c, 0xe0, 0x41, 0x02, 0xba, 0x48, 0x06, 0x72, 0x04, 0x10, 0x01, 0x18, 0x40, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x60, 0x0a, 0x15, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x2f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, - 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x63, 0x0a, 0x12, 0x53, 0x65, 0x74, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x23, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0a, 0xe0, 0x41, 0x02, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe0, 0x41, 0x02, 0xba, 0x48, 0x06, 0x72, 0x04, - 0x10, 0x01, 0x18, 0x40, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x2d, - 0x0a, 0x13, 0x53, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x32, 0xd0, 0x04, - 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, - 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x73, - 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4a, 0x77, - 0x6b, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x77, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x77, 0x6b, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, - 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6a, 0x77, 0x6b, 0x73, 0x12, 0x7b, - 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, - 0x26, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, - 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x78, 0x0a, 0x0b, 0x53, - 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x6f, - 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, - 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x69, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x10, - 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, - 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, - 0x65, 0x78, 0x6f, 0x6c, 0x61, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, - 0x74, 0x68, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x74, 0x6f, 0x63, + 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, + 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x74, 0x6f, + 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x4a, 0x77, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x4a, 0x77, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x31, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x63, 0x4a, 0x57, 0x4b, 0x52, 0x04, 0x6b, 0x65, + 0x79, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x87, 0x03, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x44, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, + 0x12, 0x35, 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2b, + 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x69, + 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6a, + 0x77, 0x6b, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, + 0x77, 0x6b, 0x73, 0x55, 0x72, 0x69, 0x12, 0x50, 0x0a, 0x25, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x21, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, 0xa8, + 0x01, 0x0a, 0x15, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x42, 0x0a, 0x16, 0x4f, 0x41, 0x75, + 0x74, 0x68, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x86, 0x01, + 0x0a, 0x11, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x12, 0x4f, 0x41, 0x75, 0x74, 0x68, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, + 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x49, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5b, + 0x0a, 0x1b, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x76, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x4f, + 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x1e, 0x4f, + 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x22, 0xa5, 0x02, 0x0a, 0x1f, + 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x73, + 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x61, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x69, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x62, 0x66, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x62, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x73, + 0x75, 0x62, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x75, 0x62, 0x12, 0x10, 0x0a, + 0x03, 0x61, 0x75, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x75, 0x64, 0x12, + 0x10, 0x0a, 0x03, 0x69, 0x73, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x73, + 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x74, 0x69, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6a, 0x74, 0x69, 0x22, 0x17, 0x0a, 0x15, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8b, 0x05, 0x0a, + 0x16, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x62, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x75, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x25, 0x0a, + 0x0e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, + 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x7a, 0x6f, + 0x6e, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x7a, 0x6f, + 0x6e, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x13, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x65, 0x0a, 0x14, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0a, 0xe0, 0x41, 0x02, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe0, 0x41, 0x02, 0xba, 0x48, + 0x06, 0x72, 0x04, 0x10, 0x01, 0x18, 0x40, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x22, 0x60, 0x0a, 0x15, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x12, 0x2f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x63, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xe0, 0x41, 0x02, 0xba, + 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0c, 0xe0, 0x41, 0x02, 0xba, 0x48, 0x06, 0x72, 0x04, 0x10, 0x01, 0x18, 0x40, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x32, 0xba, 0x0c, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, + 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, + 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x82, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x20, 0x2e, + 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x77, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x77, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x5a, 0x1b, 0x12, 0x19, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x2e, 0x77, 0x65, 0x6c, 0x6c, 0x2d, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x2f, 0x6a, 0x77, 0x6b, 0x73, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x6a, 0x77, 0x6b, 0x73, 0x12, 0xc4, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x44, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x30, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x44, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x5a, + 0x2b, 0x12, 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x2e, 0x77, 0x65, 0x6c, + 0x6c, 0x2d, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x2d, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x12, 0xa4, 0x01, + 0x0a, 0x0e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x12, 0x27, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x74, 0x6f, 0x63, + 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, + 0x74, 0x68, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x5a, 0x1d, 0x3a, 0x01, 0x2a, + 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x12, 0x78, 0x0a, 0x0a, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, + 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x97, + 0x01, 0x0a, 0x14, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x76, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, + 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, + 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, + 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0xa4, 0x01, 0x0a, 0x17, 0x4f, 0x41, 0x75, + 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, + 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, + 0xa0, 0x01, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x27, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x55, 0x73, 0x65, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x74, + 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x44, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x5a, 0x1b, 0x3a, + 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6f, 0x69, 0x64, + 0x63, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6f, 0x69, 0x64, 0x63, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, + 0x66, 0x6f, 0x12, 0x7b, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x26, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x74, + 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, + 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, + 0x78, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, + 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x69, 0x0a, 0x17, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x4e, 0x41, 0x4c, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x68, 0x65, 0x78, 0x6f, 0x6c, 0x61, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, + 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -443,39 +1592,65 @@ func file_stocklet_auth_v1_service_proto_rawDescGZIP() []byte { return file_stocklet_auth_v1_service_proto_rawDescData } -var file_stocklet_auth_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_stocklet_auth_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_stocklet_auth_v1_service_proto_goTypes = []interface{}{ - (*GetJwksRequest)(nil), // 0: stocklet.auth.v1.GetJwksRequest - (*GetJwksResponse)(nil), // 1: stocklet.auth.v1.GetJwksResponse - (*LoginPasswordRequest)(nil), // 2: stocklet.auth.v1.LoginPasswordRequest - (*LoginPasswordResponse)(nil), // 3: stocklet.auth.v1.LoginPasswordResponse - (*SetPasswordRequest)(nil), // 4: stocklet.auth.v1.SetPasswordRequest - (*SetPasswordResponse)(nil), // 5: stocklet.auth.v1.SetPasswordResponse - (*PublicEcJWK)(nil), // 6: stocklet.auth.v1.PublicEcJWK - (*AuthToken)(nil), // 7: stocklet.auth.v1.AuthToken - (*v1.ServiceInfoRequest)(nil), // 8: stocklet.common.v1.ServiceInfoRequest - (*v11.UserDeletedEvent)(nil), // 9: stocklet.events.v1.UserDeletedEvent - (*v1.ServiceInfoResponse)(nil), // 10: stocklet.common.v1.ServiceInfoResponse - (*emptypb.Empty)(nil), // 11: google.protobuf.Empty + (*GetJwksRequest)(nil), // 0: stocklet.auth.v1.GetJwksRequest + (*GetJwksResponse)(nil), // 1: stocklet.auth.v1.GetJwksResponse + (*GetOpenIDProviderConfigRequest)(nil), // 2: stocklet.auth.v1.GetOpenIDProviderConfigRequest + (*GetOpenIDProviderConfigResponse)(nil), // 3: stocklet.auth.v1.GetOpenIDProviderConfigResponse + (*OAuthAuthorizeRequest)(nil), // 4: stocklet.auth.v1.OAuthAuthorizeRequest + (*OAuthAuthorizeResponse)(nil), // 5: stocklet.auth.v1.OAuthAuthorizeResponse + (*OAuthTokenRequest)(nil), // 6: stocklet.auth.v1.OAuthTokenRequest + (*OAuthTokenResponse)(nil), // 7: stocklet.auth.v1.OAuthTokenResponse + (*OAuthTokenRevocationRequest)(nil), // 8: stocklet.auth.v1.OAuthTokenRevocationRequest + (*OAuthTokenRevocationResponse)(nil), // 9: stocklet.auth.v1.OAuthTokenRevocationResponse + (*OAuthTokenIntrospectionRequest)(nil), // 10: stocklet.auth.v1.OAuthTokenIntrospectionRequest + (*OAuthTokenIntrospectionResponse)(nil), // 11: stocklet.auth.v1.OAuthTokenIntrospectionResponse + (*OpenIDUserInfoRequest)(nil), // 12: stocklet.auth.v1.OpenIDUserInfoRequest + (*OpenIDUserInfoResponse)(nil), // 13: stocklet.auth.v1.OpenIDUserInfoResponse + (*LoginPasswordRequest)(nil), // 14: stocklet.auth.v1.LoginPasswordRequest + (*LoginPasswordResponse)(nil), // 15: stocklet.auth.v1.LoginPasswordResponse + (*SetPasswordRequest)(nil), // 16: stocklet.auth.v1.SetPasswordRequest + (*SetPasswordResponse)(nil), // 17: stocklet.auth.v1.SetPasswordResponse + (*PublicEcJWK)(nil), // 18: stocklet.auth.v1.PublicEcJWK + (*postaladdress.PostalAddress)(nil), // 19: google.type.PostalAddress + (*AuthToken)(nil), // 20: stocklet.auth.v1.AuthToken + (*v1.ServiceInfoRequest)(nil), // 21: stocklet.common.v1.ServiceInfoRequest + (*v11.UserDeletedEvent)(nil), // 22: stocklet.events.v1.UserDeletedEvent + (*v1.ServiceInfoResponse)(nil), // 23: stocklet.common.v1.ServiceInfoResponse + (*emptypb.Empty)(nil), // 24: google.protobuf.Empty } var file_stocklet_auth_v1_service_proto_depIdxs = []int32{ - 6, // 0: stocklet.auth.v1.GetJwksResponse.keys:type_name -> stocklet.auth.v1.PublicEcJWK - 7, // 1: stocklet.auth.v1.LoginPasswordResponse.data:type_name -> stocklet.auth.v1.AuthToken - 8, // 2: stocklet.auth.v1.AuthService.ServiceInfo:input_type -> stocklet.common.v1.ServiceInfoRequest - 0, // 3: stocklet.auth.v1.AuthService.GetJwks:input_type -> stocklet.auth.v1.GetJwksRequest - 2, // 4: stocklet.auth.v1.AuthService.LoginPassword:input_type -> stocklet.auth.v1.LoginPasswordRequest - 4, // 5: stocklet.auth.v1.AuthService.SetPassword:input_type -> stocklet.auth.v1.SetPasswordRequest - 9, // 6: stocklet.auth.v1.AuthService.ProcessUserDeletedEvent:input_type -> stocklet.events.v1.UserDeletedEvent - 10, // 7: stocklet.auth.v1.AuthService.ServiceInfo:output_type -> stocklet.common.v1.ServiceInfoResponse - 1, // 8: stocklet.auth.v1.AuthService.GetJwks:output_type -> stocklet.auth.v1.GetJwksResponse - 3, // 9: stocklet.auth.v1.AuthService.LoginPassword:output_type -> stocklet.auth.v1.LoginPasswordResponse - 5, // 10: stocklet.auth.v1.AuthService.SetPassword:output_type -> stocklet.auth.v1.SetPasswordResponse - 11, // 11: stocklet.auth.v1.AuthService.ProcessUserDeletedEvent:output_type -> google.protobuf.Empty - 7, // [7:12] is the sub-list for method output_type - 2, // [2:7] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 18, // 0: stocklet.auth.v1.GetJwksResponse.keys:type_name -> stocklet.auth.v1.PublicEcJWK + 19, // 1: stocklet.auth.v1.OpenIDUserInfoResponse.address:type_name -> google.type.PostalAddress + 20, // 2: stocklet.auth.v1.LoginPasswordResponse.data:type_name -> stocklet.auth.v1.AuthToken + 21, // 3: stocklet.auth.v1.AuthService.ServiceInfo:input_type -> stocklet.common.v1.ServiceInfoRequest + 0, // 4: stocklet.auth.v1.AuthService.GetJwks:input_type -> stocklet.auth.v1.GetJwksRequest + 2, // 5: stocklet.auth.v1.AuthService.GetOpenIDProviderConfig:input_type -> stocklet.auth.v1.GetOpenIDProviderConfigRequest + 4, // 6: stocklet.auth.v1.AuthService.OAuthAuthorize:input_type -> stocklet.auth.v1.OAuthAuthorizeRequest + 6, // 7: stocklet.auth.v1.AuthService.OAuthToken:input_type -> stocklet.auth.v1.OAuthTokenRequest + 8, // 8: stocklet.auth.v1.AuthService.OAuthTokenRevocation:input_type -> stocklet.auth.v1.OAuthTokenRevocationRequest + 10, // 9: stocklet.auth.v1.AuthService.OAuthTokenIntrospection:input_type -> stocklet.auth.v1.OAuthTokenIntrospectionRequest + 12, // 10: stocklet.auth.v1.AuthService.OpenIDUserInfo:input_type -> stocklet.auth.v1.OpenIDUserInfoRequest + 14, // 11: stocklet.auth.v1.AuthService.LoginPassword:input_type -> stocklet.auth.v1.LoginPasswordRequest + 16, // 12: stocklet.auth.v1.AuthService.SetPassword:input_type -> stocklet.auth.v1.SetPasswordRequest + 22, // 13: stocklet.auth.v1.AuthService.ProcessUserDeletedEvent:input_type -> stocklet.events.v1.UserDeletedEvent + 23, // 14: stocklet.auth.v1.AuthService.ServiceInfo:output_type -> stocklet.common.v1.ServiceInfoResponse + 1, // 15: stocklet.auth.v1.AuthService.GetJwks:output_type -> stocklet.auth.v1.GetJwksResponse + 3, // 16: stocklet.auth.v1.AuthService.GetOpenIDProviderConfig:output_type -> stocklet.auth.v1.GetOpenIDProviderConfigResponse + 5, // 17: stocklet.auth.v1.AuthService.OAuthAuthorize:output_type -> stocklet.auth.v1.OAuthAuthorizeResponse + 7, // 18: stocklet.auth.v1.AuthService.OAuthToken:output_type -> stocklet.auth.v1.OAuthTokenResponse + 9, // 19: stocklet.auth.v1.AuthService.OAuthTokenRevocation:output_type -> stocklet.auth.v1.OAuthTokenRevocationResponse + 11, // 20: stocklet.auth.v1.AuthService.OAuthTokenIntrospection:output_type -> stocklet.auth.v1.OAuthTokenIntrospectionResponse + 13, // 21: stocklet.auth.v1.AuthService.OpenIDUserInfo:output_type -> stocklet.auth.v1.OpenIDUserInfoResponse + 15, // 22: stocklet.auth.v1.AuthService.LoginPassword:output_type -> stocklet.auth.v1.LoginPasswordResponse + 17, // 23: stocklet.auth.v1.AuthService.SetPassword:output_type -> stocklet.auth.v1.SetPasswordResponse + 24, // 24: stocklet.auth.v1.AuthService.ProcessUserDeletedEvent:output_type -> google.protobuf.Empty + 14, // [14:25] is the sub-list for method output_type + 3, // [3:14] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_stocklet_auth_v1_service_proto_init() } @@ -510,7 +1685,7 @@ func file_stocklet_auth_v1_service_proto_init() { } } file_stocklet_auth_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginPasswordRequest); i { + switch v := v.(*GetOpenIDProviderConfigRequest); i { case 0: return &v.state case 1: @@ -522,7 +1697,7 @@ func file_stocklet_auth_v1_service_proto_init() { } } file_stocklet_auth_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginPasswordResponse); i { + switch v := v.(*GetOpenIDProviderConfigResponse); i { case 0: return &v.state case 1: @@ -534,7 +1709,7 @@ func file_stocklet_auth_v1_service_proto_init() { } } file_stocklet_auth_v1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetPasswordRequest); i { + switch v := v.(*OAuthAuthorizeRequest); i { case 0: return &v.state case 1: @@ -546,6 +1721,150 @@ func file_stocklet_auth_v1_service_proto_init() { } } file_stocklet_auth_v1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuthAuthorizeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuthTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuthTokenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuthTokenRevocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuthTokenRevocationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuthTokenIntrospectionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuthTokenIntrospectionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenIDUserInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenIDUserInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginPasswordRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginPasswordResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPasswordRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stocklet_auth_v1_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetPasswordResponse); i { case 0: return &v.state @@ -564,7 +1883,7 @@ func file_stocklet_auth_v1_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stocklet_auth_v1_service_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/internal/pkg/protogen/auth/v1/service.pb.gw.go b/internal/pkg/protogen/auth/v1/service.pb.gw.go index cc4ec53..6a819b2 100644 --- a/internal/pkg/protogen/auth/v1/service.pb.gw.go +++ b/internal/pkg/protogen/auth/v1/service.pb.gw.go @@ -68,6 +68,284 @@ func local_request_AuthService_GetJwks_0(ctx context.Context, marshaler runtime. } +func request_AuthService_GetJwks_1(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetJwksRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetJwks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_GetJwks_1(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetJwksRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetJwks(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_GetOpenIDProviderConfig_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetOpenIDProviderConfigRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetOpenIDProviderConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_GetOpenIDProviderConfig_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetOpenIDProviderConfigRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetOpenIDProviderConfig(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_GetOpenIDProviderConfig_1(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetOpenIDProviderConfigRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetOpenIDProviderConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_GetOpenIDProviderConfig_1(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetOpenIDProviderConfigRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetOpenIDProviderConfig(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AuthService_OAuthAuthorize_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_AuthService_OAuthAuthorize_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthAuthorizeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_OAuthAuthorize_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.OAuthAuthorize(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_OAuthAuthorize_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthAuthorizeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_OAuthAuthorize_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.OAuthAuthorize(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_OAuthAuthorize_1(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthAuthorizeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.OAuthAuthorize(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_OAuthAuthorize_1(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthAuthorizeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.OAuthAuthorize(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_OAuthToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthTokenRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.OAuthToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_OAuthToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthTokenRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.OAuthToken(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_OAuthTokenRevocation_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthTokenRevocationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.OAuthTokenRevocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_OAuthTokenRevocation_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthTokenRevocationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.OAuthTokenRevocation(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_OAuthTokenIntrospection_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthTokenIntrospectionRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.OAuthTokenIntrospection(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_OAuthTokenIntrospection_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthTokenIntrospectionRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.OAuthTokenIntrospection(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_OpenIDUserInfo_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OpenIDUserInfoRequest + var metadata runtime.ServerMetadata + + msg, err := client.OpenIDUserInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_OpenIDUserInfo_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OpenIDUserInfoRequest + var metadata runtime.ServerMetadata + + msg, err := server.OpenIDUserInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_OpenIDUserInfo_1(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OpenIDUserInfoRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.OpenIDUserInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_OpenIDUserInfo_1(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OpenIDUserInfoRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.OpenIDUserInfo(ctx, &protoReq) + return msg, metadata, err + +} + func request_AuthService_LoginPassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LoginPasswordRequest var metadata runtime.ServerMetadata @@ -192,6 +470,256 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_AuthService_GetJwks_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/GetJwks", runtime.WithHTTPPathPattern("/v1/auth/.well-known/jwks")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_GetJwks_1(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_GetJwks_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthService_GetOpenIDProviderConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/GetOpenIDProviderConfig", runtime.WithHTTPPathPattern("/v1/auth/openid")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_GetOpenIDProviderConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_GetOpenIDProviderConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthService_GetOpenIDProviderConfig_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/GetOpenIDProviderConfig", runtime.WithHTTPPathPattern("/v1/auth/.well-known/openid-configuration")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_GetOpenIDProviderConfig_1(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_GetOpenIDProviderConfig_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthService_OAuthAuthorize_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthAuthorize", runtime.WithHTTPPathPattern("/v1/auth/oauth/authorize")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_OAuthAuthorize_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthAuthorize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OAuthAuthorize_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthAuthorize", runtime.WithHTTPPathPattern("/v1/auth/oauth/authorize")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_OAuthAuthorize_1(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthAuthorize_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OAuthToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthToken", runtime.WithHTTPPathPattern("/v1/auth/oauth/token")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_OAuthToken_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OAuthTokenRevocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthTokenRevocation", runtime.WithHTTPPathPattern("/v1/auth/oauth/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_OAuthTokenRevocation_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthTokenRevocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OAuthTokenIntrospection_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthTokenIntrospection", runtime.WithHTTPPathPattern("/v1/auth/oauth/introspect")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_OAuthTokenIntrospection_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthTokenIntrospection_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthService_OpenIDUserInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OpenIDUserInfo", runtime.WithHTTPPathPattern("/v1/auth/oidc/userinfo")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_OpenIDUserInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OpenIDUserInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OpenIDUserInfo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OpenIDUserInfo", runtime.WithHTTPPathPattern("/v1/auth/oidc/userinfo")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_OpenIDUserInfo_1(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OpenIDUserInfo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_AuthService_LoginPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -327,6 +855,226 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_AuthService_GetJwks_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/GetJwks", runtime.WithHTTPPathPattern("/v1/auth/.well-known/jwks")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_GetJwks_1(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_GetJwks_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthService_GetOpenIDProviderConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/GetOpenIDProviderConfig", runtime.WithHTTPPathPattern("/v1/auth/openid")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_GetOpenIDProviderConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_GetOpenIDProviderConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthService_GetOpenIDProviderConfig_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/GetOpenIDProviderConfig", runtime.WithHTTPPathPattern("/v1/auth/.well-known/openid-configuration")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_GetOpenIDProviderConfig_1(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_GetOpenIDProviderConfig_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthService_OAuthAuthorize_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthAuthorize", runtime.WithHTTPPathPattern("/v1/auth/oauth/authorize")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_OAuthAuthorize_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthAuthorize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OAuthAuthorize_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthAuthorize", runtime.WithHTTPPathPattern("/v1/auth/oauth/authorize")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_OAuthAuthorize_1(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthAuthorize_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OAuthToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthToken", runtime.WithHTTPPathPattern("/v1/auth/oauth/token")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_OAuthToken_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OAuthTokenRevocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthTokenRevocation", runtime.WithHTTPPathPattern("/v1/auth/oauth/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_OAuthTokenRevocation_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthTokenRevocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OAuthTokenIntrospection_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OAuthTokenIntrospection", runtime.WithHTTPPathPattern("/v1/auth/oauth/introspect")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_OAuthTokenIntrospection_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OAuthTokenIntrospection_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthService_OpenIDUserInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OpenIDUserInfo", runtime.WithHTTPPathPattern("/v1/auth/oidc/userinfo")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_OpenIDUserInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OpenIDUserInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_OpenIDUserInfo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/stocklet.auth.v1.AuthService/OpenIDUserInfo", runtime.WithHTTPPathPattern("/v1/auth/oidc/userinfo")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_OpenIDUserInfo_1(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_OpenIDUserInfo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_AuthService_LoginPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -379,6 +1127,26 @@ var ( pattern_AuthService_GetJwks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "jwks"}, "")) + pattern_AuthService_GetJwks_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", ".well-known", "jwks"}, "")) + + pattern_AuthService_GetOpenIDProviderConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "openid"}, "")) + + pattern_AuthService_GetOpenIDProviderConfig_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", ".well-known", "openid-configuration"}, "")) + + pattern_AuthService_OAuthAuthorize_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", "oauth", "authorize"}, "")) + + pattern_AuthService_OAuthAuthorize_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", "oauth", "authorize"}, "")) + + pattern_AuthService_OAuthToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", "oauth", "token"}, "")) + + pattern_AuthService_OAuthTokenRevocation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", "oauth", "revoke"}, "")) + + pattern_AuthService_OAuthTokenIntrospection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", "oauth", "introspect"}, "")) + + pattern_AuthService_OpenIDUserInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", "oidc", "userinfo"}, "")) + + pattern_AuthService_OpenIDUserInfo_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "auth", "oidc", "userinfo"}, "")) + pattern_AuthService_LoginPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "login"}, "")) pattern_AuthService_SetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "password"}, "")) @@ -389,6 +1157,26 @@ var ( forward_AuthService_GetJwks_0 = runtime.ForwardResponseMessage + forward_AuthService_GetJwks_1 = runtime.ForwardResponseMessage + + forward_AuthService_GetOpenIDProviderConfig_0 = runtime.ForwardResponseMessage + + forward_AuthService_GetOpenIDProviderConfig_1 = runtime.ForwardResponseMessage + + forward_AuthService_OAuthAuthorize_0 = runtime.ForwardResponseMessage + + forward_AuthService_OAuthAuthorize_1 = runtime.ForwardResponseMessage + + forward_AuthService_OAuthToken_0 = runtime.ForwardResponseMessage + + forward_AuthService_OAuthTokenRevocation_0 = runtime.ForwardResponseMessage + + forward_AuthService_OAuthTokenIntrospection_0 = runtime.ForwardResponseMessage + + forward_AuthService_OpenIDUserInfo_0 = runtime.ForwardResponseMessage + + forward_AuthService_OpenIDUserInfo_1 = runtime.ForwardResponseMessage + forward_AuthService_LoginPassword_0 = runtime.ForwardResponseMessage forward_AuthService_SetPassword_0 = runtime.ForwardResponseMessage diff --git a/internal/pkg/protogen/auth/v1/service_grpc.pb.go b/internal/pkg/protogen/auth/v1/service_grpc.pb.go index c284114..28b4e9f 100644 --- a/internal/pkg/protogen/auth/v1/service_grpc.pb.go +++ b/internal/pkg/protogen/auth/v1/service_grpc.pb.go @@ -1,4 +1,4 @@ -// Copyright (C) 2024 Declan Teevan +// Copyright (C) 2025 Declan Teevan // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by @@ -39,6 +39,12 @@ const _ = grpc.SupportPackageIsVersion7 const ( AuthService_ServiceInfo_FullMethodName = "/stocklet.auth.v1.AuthService/ServiceInfo" AuthService_GetJwks_FullMethodName = "/stocklet.auth.v1.AuthService/GetJwks" + AuthService_GetOpenIDProviderConfig_FullMethodName = "/stocklet.auth.v1.AuthService/GetOpenIDProviderConfig" + AuthService_OAuthAuthorize_FullMethodName = "/stocklet.auth.v1.AuthService/OAuthAuthorize" + AuthService_OAuthToken_FullMethodName = "/stocklet.auth.v1.AuthService/OAuthToken" + AuthService_OAuthTokenRevocation_FullMethodName = "/stocklet.auth.v1.AuthService/OAuthTokenRevocation" + AuthService_OAuthTokenIntrospection_FullMethodName = "/stocklet.auth.v1.AuthService/OAuthTokenIntrospection" + AuthService_OpenIDUserInfo_FullMethodName = "/stocklet.auth.v1.AuthService/OpenIDUserInfo" AuthService_LoginPassword_FullMethodName = "/stocklet.auth.v1.AuthService/LoginPassword" AuthService_SetPassword_FullMethodName = "/stocklet.auth.v1.AuthService/SetPassword" AuthService_ProcessUserDeletedEvent_FullMethodName = "/stocklet.auth.v1.AuthService/ProcessUserDeletedEvent" @@ -53,6 +59,24 @@ type AuthServiceClient interface { // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error) GetJwks(ctx context.Context, in *GetJwksRequest, opts ...grpc.CallOption) (*GetJwksResponse, error) + // OpenID Connect Discovery Endpoint + // spec: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest + GetOpenIDProviderConfig(ctx context.Context, in *GetOpenIDProviderConfigRequest, opts ...grpc.CallOption) (*GetOpenIDProviderConfigResponse, error) + // OAuth 2.0 Endpoint + // spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.1 + OAuthAuthorize(ctx context.Context, in *OAuthAuthorizeRequest, opts ...grpc.CallOption) (*OAuthAuthorizeResponse, error) + // OAuth 2.0 Endpoint + // spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.2 + OAuthToken(ctx context.Context, in *OAuthTokenRequest, opts ...grpc.CallOption) (*OAuthTokenResponse, error) + // OAuth 2.0 Endpoint + // spec (RFC 7009): https://www.rfc-editor.org/rfc/rfc7009 + OAuthTokenRevocation(ctx context.Context, in *OAuthTokenRevocationRequest, opts ...grpc.CallOption) (*OAuthTokenRevocationResponse, error) + // OAuth 2.0 Endpoint + // spec (RFC 7662): https://www.rfc-editor.org/rfc/rfc7662 + OAuthTokenIntrospection(ctx context.Context, in *OAuthTokenIntrospectionRequest, opts ...grpc.CallOption) (*OAuthTokenIntrospectionResponse, error) + // OpenID Connect Endpoint + // spec: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo + OpenIDUserInfo(ctx context.Context, in *OpenIDUserInfoRequest, opts ...grpc.CallOption) (*OpenIDUserInfoResponse, error) LoginPassword(ctx context.Context, in *LoginPasswordRequest, opts ...grpc.CallOption) (*LoginPasswordResponse, error) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*SetPasswordResponse, error) // A consumer will call this method to process events. @@ -89,6 +113,60 @@ func (c *authServiceClient) GetJwks(ctx context.Context, in *GetJwksRequest, opt return out, nil } +func (c *authServiceClient) GetOpenIDProviderConfig(ctx context.Context, in *GetOpenIDProviderConfigRequest, opts ...grpc.CallOption) (*GetOpenIDProviderConfigResponse, error) { + out := new(GetOpenIDProviderConfigResponse) + err := c.cc.Invoke(ctx, AuthService_GetOpenIDProviderConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) OAuthAuthorize(ctx context.Context, in *OAuthAuthorizeRequest, opts ...grpc.CallOption) (*OAuthAuthorizeResponse, error) { + out := new(OAuthAuthorizeResponse) + err := c.cc.Invoke(ctx, AuthService_OAuthAuthorize_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) OAuthToken(ctx context.Context, in *OAuthTokenRequest, opts ...grpc.CallOption) (*OAuthTokenResponse, error) { + out := new(OAuthTokenResponse) + err := c.cc.Invoke(ctx, AuthService_OAuthToken_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) OAuthTokenRevocation(ctx context.Context, in *OAuthTokenRevocationRequest, opts ...grpc.CallOption) (*OAuthTokenRevocationResponse, error) { + out := new(OAuthTokenRevocationResponse) + err := c.cc.Invoke(ctx, AuthService_OAuthTokenRevocation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) OAuthTokenIntrospection(ctx context.Context, in *OAuthTokenIntrospectionRequest, opts ...grpc.CallOption) (*OAuthTokenIntrospectionResponse, error) { + out := new(OAuthTokenIntrospectionResponse) + err := c.cc.Invoke(ctx, AuthService_OAuthTokenIntrospection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) OpenIDUserInfo(ctx context.Context, in *OpenIDUserInfoRequest, opts ...grpc.CallOption) (*OpenIDUserInfoResponse, error) { + out := new(OpenIDUserInfoResponse) + err := c.cc.Invoke(ctx, AuthService_OpenIDUserInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *authServiceClient) LoginPassword(ctx context.Context, in *LoginPasswordRequest, opts ...grpc.CallOption) (*LoginPasswordResponse, error) { out := new(LoginPasswordResponse) err := c.cc.Invoke(ctx, AuthService_LoginPassword_FullMethodName, in, out, opts...) @@ -125,6 +203,24 @@ type AuthServiceServer interface { // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) GetJwks(context.Context, *GetJwksRequest) (*GetJwksResponse, error) + // OpenID Connect Discovery Endpoint + // spec: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest + GetOpenIDProviderConfig(context.Context, *GetOpenIDProviderConfigRequest) (*GetOpenIDProviderConfigResponse, error) + // OAuth 2.0 Endpoint + // spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.1 + OAuthAuthorize(context.Context, *OAuthAuthorizeRequest) (*OAuthAuthorizeResponse, error) + // OAuth 2.0 Endpoint + // spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.2 + OAuthToken(context.Context, *OAuthTokenRequest) (*OAuthTokenResponse, error) + // OAuth 2.0 Endpoint + // spec (RFC 7009): https://www.rfc-editor.org/rfc/rfc7009 + OAuthTokenRevocation(context.Context, *OAuthTokenRevocationRequest) (*OAuthTokenRevocationResponse, error) + // OAuth 2.0 Endpoint + // spec (RFC 7662): https://www.rfc-editor.org/rfc/rfc7662 + OAuthTokenIntrospection(context.Context, *OAuthTokenIntrospectionRequest) (*OAuthTokenIntrospectionResponse, error) + // OpenID Connect Endpoint + // spec: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo + OpenIDUserInfo(context.Context, *OpenIDUserInfoRequest) (*OpenIDUserInfoResponse, error) LoginPassword(context.Context, *LoginPasswordRequest) (*LoginPasswordResponse, error) SetPassword(context.Context, *SetPasswordRequest) (*SetPasswordResponse, error) // A consumer will call this method to process events. @@ -146,6 +242,24 @@ func (UnimplementedAuthServiceServer) ServiceInfo(context.Context, *v1.ServiceIn func (UnimplementedAuthServiceServer) GetJwks(context.Context, *GetJwksRequest) (*GetJwksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetJwks not implemented") } +func (UnimplementedAuthServiceServer) GetOpenIDProviderConfig(context.Context, *GetOpenIDProviderConfigRequest) (*GetOpenIDProviderConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOpenIDProviderConfig not implemented") +} +func (UnimplementedAuthServiceServer) OAuthAuthorize(context.Context, *OAuthAuthorizeRequest) (*OAuthAuthorizeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OAuthAuthorize not implemented") +} +func (UnimplementedAuthServiceServer) OAuthToken(context.Context, *OAuthTokenRequest) (*OAuthTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OAuthToken not implemented") +} +func (UnimplementedAuthServiceServer) OAuthTokenRevocation(context.Context, *OAuthTokenRevocationRequest) (*OAuthTokenRevocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OAuthTokenRevocation not implemented") +} +func (UnimplementedAuthServiceServer) OAuthTokenIntrospection(context.Context, *OAuthTokenIntrospectionRequest) (*OAuthTokenIntrospectionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OAuthTokenIntrospection not implemented") +} +func (UnimplementedAuthServiceServer) OpenIDUserInfo(context.Context, *OpenIDUserInfoRequest) (*OpenIDUserInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OpenIDUserInfo not implemented") +} func (UnimplementedAuthServiceServer) LoginPassword(context.Context, *LoginPasswordRequest) (*LoginPasswordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LoginPassword not implemented") } @@ -204,6 +318,114 @@ func _AuthService_GetJwks_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _AuthService_GetOpenIDProviderConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOpenIDProviderConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetOpenIDProviderConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_GetOpenIDProviderConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetOpenIDProviderConfig(ctx, req.(*GetOpenIDProviderConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_OAuthAuthorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OAuthAuthorizeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).OAuthAuthorize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_OAuthAuthorize_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).OAuthAuthorize(ctx, req.(*OAuthAuthorizeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_OAuthToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OAuthTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).OAuthToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_OAuthToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).OAuthToken(ctx, req.(*OAuthTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_OAuthTokenRevocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OAuthTokenRevocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).OAuthTokenRevocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_OAuthTokenRevocation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).OAuthTokenRevocation(ctx, req.(*OAuthTokenRevocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_OAuthTokenIntrospection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OAuthTokenIntrospectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).OAuthTokenIntrospection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_OAuthTokenIntrospection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).OAuthTokenIntrospection(ctx, req.(*OAuthTokenIntrospectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_OpenIDUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OpenIDUserInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).OpenIDUserInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_OpenIDUserInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).OpenIDUserInfo(ctx, req.(*OpenIDUserInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AuthService_LoginPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LoginPasswordRequest) if err := dec(in); err != nil { @@ -273,6 +495,30 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetJwks", Handler: _AuthService_GetJwks_Handler, }, + { + MethodName: "GetOpenIDProviderConfig", + Handler: _AuthService_GetOpenIDProviderConfig_Handler, + }, + { + MethodName: "OAuthAuthorize", + Handler: _AuthService_OAuthAuthorize_Handler, + }, + { + MethodName: "OAuthToken", + Handler: _AuthService_OAuthToken_Handler, + }, + { + MethodName: "OAuthTokenRevocation", + Handler: _AuthService_OAuthTokenRevocation_Handler, + }, + { + MethodName: "OAuthTokenIntrospection", + Handler: _AuthService_OAuthTokenIntrospection_Handler, + }, + { + MethodName: "OpenIDUserInfo", + Handler: _AuthService_OpenIDUserInfo_Handler, + }, { MethodName: "LoginPassword", Handler: _AuthService_LoginPassword_Handler, diff --git a/internal/pkg/protogen/auth/v1/types.pb.go b/internal/pkg/protogen/auth/v1/types.pb.go index a540dd6..80613b4 100644 --- a/internal/pkg/protogen/auth/v1/types.pb.go +++ b/internal/pkg/protogen/auth/v1/types.pb.go @@ -1,4 +1,4 @@ -// Copyright (C) 2024 Declan Teevan +// Copyright (C) 2025 Declan Teevan // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/internal/pkg/protogen/order/v1/types.pb.go b/internal/pkg/protogen/order/v1/types.pb.go index ba1b67f..8c9ec91 100644 --- a/internal/pkg/protogen/order/v1/types.pb.go +++ b/internal/pkg/protogen/order/v1/types.pb.go @@ -206,54 +206,54 @@ var file_stocklet_order_v1_types_proto_rawDesc = []byte{ 0x11, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xeb, 0x03, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0xea, 0x03, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x43, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x69, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x42, 0x0b, 0xba, 0x48, 0x08, 0x82, 0x01, 0x05, 0x10, 0x01, 0x22, 0x01, 0x00, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x47, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, - 0x74, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0c, 0xba, 0x48, 0x09, - 0x9a, 0x01, 0x06, 0x2a, 0x04, 0x1a, 0x02, 0x20, 0x00, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x12, 0x28, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x0e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x2d, 0x0a, 0x0b, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x01, 0x52, - 0x0a, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x22, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x02, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, - 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x42, 0x0d, - 0x0a, 0x0b, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x2a, 0xb4, 0x01, - 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, - 0x18, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x4f, - 0x52, 0x44, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, - 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, - 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, - 0x15, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x50, - 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, - 0x45, 0x44, 0x10, 0x05, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x68, 0x65, 0x78, 0x6f, 0x6c, 0x61, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, - 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2f, - 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x75, 0x73, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x00, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x47, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, 0x65, 0x74, + 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x9a, + 0x01, 0x06, 0x2a, 0x04, 0x1a, 0x02, 0x20, 0x00, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x28, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x0e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, + 0x0a, 0x0b, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x01, 0x52, 0x0a, + 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x02, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, + 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x0e, 0x0a, + 0x0c, 0x5f, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x2a, 0xb4, 0x01, 0x0a, + 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x18, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, + 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52, 0x44, 0x45, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x50, 0x50, + 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x52, 0x44, 0x45, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, + 0x44, 0x10, 0x05, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x68, 0x65, 0x78, 0x6f, 0x6c, 0x61, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x6c, + 0x65, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2f, 0x76, + 0x31, 0x3b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/internal/svc/auth/auth.go b/internal/svc/auth/auth.go index 6c4dc34..600c2a8 100644 --- a/internal/svc/auth/auth.go +++ b/internal/svc/auth/auth.go @@ -20,6 +20,8 @@ import ( "buf.build/go/protovalidate" "github.com/rs/zerolog/log" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/emptypb" "github.com/hexolan/stocklet/internal/pkg/errors" @@ -40,6 +42,9 @@ type AuthService struct { pbVal *protovalidate.Validator } +// Ensure methods are implemented in AuthService at compile time +var _ pb.AuthServiceServer = (*AuthService)(nil) + // Interface for database methods // Allows implementing separate controllers for different databases (e.g. Postgres, MongoDB, etc) type StorageController interface { @@ -82,6 +87,30 @@ func (svc AuthService) ServiceInfo(ctx context.Context, req *commonpb.ServiceInf }, nil } +func (svc AuthService) GetOpenIDProviderConfig(ctx context.Context, req *pb.GetOpenIDProviderConfigRequest) (*pb.GetOpenIDProviderConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOpenIDProviderConfig not implemented") +} + +func (svc AuthService) OAuthAuthorize(ctx context.Context, req *pb.OAuthAuthorizeRequest) (*pb.OAuthAuthorizeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OAuthAuthorize not implemented") +} + +func (svc AuthService) OAuthToken(ctx context.Context, req *pb.OAuthTokenRequest) (*pb.OAuthTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OAuthToken not implemented") +} + +func (svc AuthService) OAuthTokenRevocation(ctx context.Context, req *pb.OAuthTokenRevocationRequest) (*pb.OAuthTokenRevocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OAuthTokenRevocation not implemented") +} + +func (svc AuthService) OAuthTokenIntrospection(ctx context.Context, req *pb.OAuthTokenIntrospectionRequest) (*pb.OAuthTokenIntrospectionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OAuthTokenIntrospection not implemented") +} + +func (svc AuthService) OpenIDUserInfo(ctx context.Context, req *pb.OpenIDUserInfoRequest) (*pb.OpenIDUserInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OpenIDUserInfo not implemented") +} + func (svc AuthService) LoginPassword(ctx context.Context, req *pb.LoginPasswordRequest) (*pb.LoginPasswordResponse, error) { // Validate the request args if err := (*svc.pbVal).Validate(req); err != nil { @@ -91,7 +120,7 @@ func (svc AuthService) LoginPassword(ctx context.Context, req *pb.LoginPasswordR // Verify password match, err := svc.store.VerifyPassword(ctx, req.UserId, req.Password) - if err != nil || match == false { + if err != nil || !match { return nil, errors.WrapServiceError(errors.ErrCodeForbidden, "invalid user id or password", err) } diff --git a/internal/svc/auth/hashing.go b/internal/svc/auth/hashing.go index 582dcb2..4b10801 100644 --- a/internal/svc/auth/hashing.go +++ b/internal/svc/auth/hashing.go @@ -32,9 +32,5 @@ func HashPassword(password string) (string, error) { func CompareHashAndPassword(password string, hashedPassword string) bool { err := bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(password)) - if err != nil { - return false - } - - return true + return err == nil } diff --git a/schema/openapi/services.swagger.yaml b/schema/openapi/services.swagger.yaml index 951b4bd..d76a812 100644 --- a/schema/openapi/services.swagger.yaml +++ b/schema/openapi/services.swagger.yaml @@ -24,6 +24,37 @@ consumes: produces: - application/json paths: + /v1/auth/.well-known/jwks: + get: + operationId: AuthService_GetJwks2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetJwksResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - AuthService + /v1/auth/.well-known/openid-configuration: + get: + summary: |- + OpenID Connect Discovery Endpoint + spec: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest + operationId: AuthService_GetOpenIDProviderConfig2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetOpenIDProviderConfigResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - AuthService /v1/auth/jwks: get: operationId: AuthService_GetJwks @@ -58,6 +89,191 @@ paths: $ref: '#/definitions/v1LoginPasswordRequest' tags: - AuthService + /v1/auth/oauth/authorize: + get: + summary: |- + OAuth 2.0 Endpoint + spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.1 + operationId: AuthService_OAuthAuthorize + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1OAuthAuthorizeResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: responseType + in: query + required: false + type: string + - name: clientId + in: query + required: false + type: string + - name: redirectUri + in: query + required: false + type: string + - name: scope + in: query + required: false + type: string + - name: state + in: query + required: false + type: string + tags: + - AuthService + post: + summary: |- + OAuth 2.0 Endpoint + spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.1 + operationId: AuthService_OAuthAuthorize2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1OAuthAuthorizeResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1OAuthAuthorizeRequest' + tags: + - AuthService + /v1/auth/oauth/introspect: + post: + summary: |- + OAuth 2.0 Endpoint + spec (RFC 7662): https://www.rfc-editor.org/rfc/rfc7662 + operationId: AuthService_OAuthTokenIntrospection + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1OAuthTokenIntrospectionResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1OAuthTokenIntrospectionRequest' + tags: + - AuthService + /v1/auth/oauth/revoke: + post: + summary: |- + OAuth 2.0 Endpoint + spec (RFC 7009): https://www.rfc-editor.org/rfc/rfc7009 + operationId: AuthService_OAuthTokenRevocation + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1OAuthTokenRevocationResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1OAuthTokenRevocationRequest' + tags: + - AuthService + /v1/auth/oauth/token: + post: + summary: |- + OAuth 2.0 Endpoint + spec (RFC 6749): https://www.rfc-editor.org/rfc/rfc6749#section-3.2 + operationId: AuthService_OAuthToken + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1OAuthTokenResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1OAuthTokenRequest' + tags: + - AuthService + /v1/auth/oidc/userinfo: + get: + summary: |- + OpenID Connect Endpoint + spec: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo + operationId: AuthService_OpenIDUserInfo + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1OpenIDUserInfoResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - AuthService + post: + summary: |- + OpenID Connect Endpoint + spec: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo + operationId: AuthService_OpenIDUserInfo2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1OpenIDUserInfoResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1OpenIDUserInfoRequest' + tags: + - AuthService + /v1/auth/openid: + get: + summary: |- + OpenID Connect Discovery Endpoint + spec: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest + operationId: AuthService_GetOpenIDProviderConfig + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetOpenIDProviderConfigResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - AuthService /v1/auth/password: post: operationId: AuthService_SetPassword @@ -475,6 +691,133 @@ definitions: items: type: object $ref: '#/definitions/protobufAny' + typePostalAddress: + type: object + properties: + revision: + type: integer + format: int32 + description: |- + The schema revision of the `PostalAddress`. This must be set to 0, which is + the latest revision. + + All new revisions **must** be backward compatible with old revisions. + regionCode: + type: string + description: |- + Required. CLDR region code of the country/region of the address. This + is never inferred and it is up to the user to ensure the value is + correct. See http://cldr.unicode.org/ and + http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + for details. Example: "CH" for Switzerland. + languageCode: + type: string + description: |- + Optional. BCP-47 language code of the contents of this address (if + known). This is often the UI language of the input form or is expected + to match one of the languages used in the address' country/region, or their + transliterated equivalents. + This can affect formatting in certain countries, but is not critical + to the correctness of the data and will never affect any validation or + other non-formatting related operations. + + If this value is not known, it should be omitted (rather than specifying a + possibly incorrect default). + + Examples: "zh-Hant", "ja", "ja-Latn", "en". + postalCode: + type: string + description: |- + Optional. Postal code of the address. Not all countries use or require + postal codes to be present, but where they are used, they may trigger + additional validation with other parts of the address (e.g. state/zip + validation in the U.S.A.). + sortingCode: + type: string + description: |- + Optional. Additional, country-specific, sorting code. This is not used + in most regions. Where it is used, the value is either a string like + "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number + alone, representing the "sector code" (Jamaica), "delivery area indicator" + (Malawi) or "post office indicator" (e.g. Cรดte d'Ivoire). + administrativeArea: + type: string + description: |- + Optional. Highest administrative subdivision which is used for postal + addresses of a country or region. + For example, this can be a state, a province, an oblast, or a prefecture. + Specifically, for Spain this is the province and not the autonomous + community (e.g. "Barcelona" and not "Catalonia"). + Many countries don't use an administrative area in postal addresses. E.g. + in Switzerland this should be left unpopulated. + locality: + type: string + description: |- + Optional. Generally refers to the city/town portion of the address. + Examples: US city, IT comune, UK post town. + In regions of the world where localities are not well defined or do not fit + into this structure well, leave locality empty and use address_lines. + sublocality: + type: string + description: |- + Optional. Sublocality of the address. + For example, this can be neighborhoods, boroughs, districts. + addressLines: + type: array + items: + type: string + description: |- + Unstructured address lines describing the lower levels of an address. + + Because values in address_lines do not have type information and may + sometimes contain multiple values in a single field (e.g. + "Austin, TX"), it is important that the line order is clear. The order of + address lines should be "envelope order" for the country/region of the + address. In places where this can vary (e.g. Japan), address_language is + used to make it explicit (e.g. "ja" for large-to-small ordering and + "ja-Latn" or "en" for small-to-large). This way, the most specific line of + an address can be selected based on the language. + + The minimum permitted structural representation of an address consists + of a region_code with all remaining information placed in the + address_lines. It would be possible to format such an address very + approximately without geocoding, but no semantic reasoning could be + made about any of the address components until it was at least + partially resolved. + + Creating an address only containing a region_code and address_lines, and + then geocoding is the recommended way to handle completely unstructured + addresses (as opposed to guessing which parts of the address should be + localities or administrative areas). + recipients: + type: array + items: + type: string + description: |- + Optional. The recipient at the address. + This field may, under certain circumstances, contain multiline information. + For example, it might contain "care of" information. + organization: + type: string + description: Optional. The name of the organization at the address. + description: |- + Represents a postal address, e.g. for postal delivery or payments addresses. + Given a postal address, a postal service can deliver items to a premise, P.O. + Box or similar. + It is not intended to model geographical locations (roads, towns, + mountains). + + In typical usage an address would be created via user input or from importing + existing data, depending on the type of process. + + Advice on address input / editing: + - Use an i18n-ready address widget such as + https://github.com/google/libaddressinput) + - Users should not be presented with UI elements for input or editing of + fields outside countries where that field is used. + + For more guidance on how to use this schema, please see: + https://support.google.com/business/answer/6397478 v1AuthToken: type: object properties: @@ -501,6 +844,31 @@ definitions: items: type: object $ref: '#/definitions/v1PublicEcJWK' + v1GetOpenIDProviderConfigResponse: + type: object + properties: + issuer: + type: string + authorizationEndpoint: + type: string + tokenEndpoint: + type: string + userinfoEndpoint: + type: string + jwksUri: + type: string + tokenEndpointAuthMethodsSupported: + type: array + items: + type: string + scopesSupported: + type: array + items: + type: string + claimsSupported: + type: array + items: + type: string v1LoginPasswordRequest: type: object properties: @@ -518,6 +886,144 @@ definitions: type: string data: $ref: '#/definitions/v1AuthToken' + v1OAuthAuthorizeRequest: + type: object + properties: + responseType: + type: string + clientId: + type: string + redirectUri: + type: string + scope: + type: string + state: + type: string + v1OAuthAuthorizeResponse: + type: object + properties: + code: + type: string + state: + type: string + v1OAuthTokenIntrospectionRequest: + type: object + properties: + token: + type: string + tokenTypeHint: + type: string + v1OAuthTokenIntrospectionResponse: + type: object + properties: + active: + type: boolean + scope: + type: string + clientId: + type: string + username: + type: string + tokenType: + type: string + exp: + type: string + format: int64 + iat: + type: string + format: int64 + nbf: + type: string + format: int64 + sub: + type: string + aud: + type: string + iss: + type: string + jti: + type: string + v1OAuthTokenRequest: + type: object + properties: + grantType: + type: string + code: + type: string + redirectUri: + type: string + clientId: + type: string + v1OAuthTokenResponse: + type: object + properties: + accessToken: + type: string + tokenType: + type: string + refreshToken: + type: string + expiresIn: + type: string + format: int64 + idToken: + type: string + v1OAuthTokenRevocationRequest: + type: object + properties: + token: + type: string + tokenTypeHint: + type: string + v1OAuthTokenRevocationResponse: + type: object + v1OpenIDUserInfoRequest: + type: object + v1OpenIDUserInfoResponse: + type: object + properties: + sub: + type: string + name: + type: string + familyName: + type: string + givenName: + type: string + middleName: + type: string + nickname: + type: string + preferredUsername: + type: string + profile: + type: string + picture: + type: string + website: + type: string + email: + type: string + emailVerified: + type: boolean + gender: + type: string + birthdate: + type: string + zoneinfo: + type: string + locale: + type: string + phoneNumber: + type: string + phoneNumberVerified: + type: boolean + address: + $ref: '#/definitions/typePostalAddress' + updatedAt: + type: string + format: int64 + title: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims v1Order: type: object properties: