mirror of
https://github.com/usememos/memos.git
synced 2026-11-19 10:29:11 +01:00
639 lines
22 KiB
Go
639 lines
22 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.12
|
|
// protoc (unknown)
|
|
// source: api/auth_service.proto
|
|
|
|
package api
|
|
|
|
import (
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// Request message for AuthService.SignIn.
|
|
type SignInRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// The credentials to authenticate with. Provide exactly one.
|
|
//
|
|
// Types that are valid to be assigned to Credentials:
|
|
//
|
|
// *SignInRequest_PasswordCredentials_
|
|
// *SignInRequest_SsoCredentials_
|
|
Credentials isSignInRequest_Credentials `protobuf_oneof:"credentials"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SignInRequest) Reset() {
|
|
*x = SignInRequest{}
|
|
mi := &file_api_auth_service_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignInRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignInRequest) ProtoMessage() {}
|
|
|
|
func (x *SignInRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.
|
|
func (*SignInRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *SignInRequest) GetCredentials() isSignInRequest_Credentials {
|
|
if x != nil {
|
|
return x.Credentials
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *SignInRequest) GetPasswordCredentials() *SignInRequest_PasswordCredentials {
|
|
if x != nil {
|
|
if x, ok := x.Credentials.(*SignInRequest_PasswordCredentials_); ok {
|
|
return x.PasswordCredentials
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *SignInRequest) GetSsoCredentials() *SignInRequest_SsoCredentials {
|
|
if x != nil {
|
|
if x, ok := x.Credentials.(*SignInRequest_SsoCredentials_); ok {
|
|
return x.SsoCredentials
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type isSignInRequest_Credentials interface {
|
|
isSignInRequest_Credentials()
|
|
}
|
|
|
|
type SignInRequest_PasswordCredentials_ struct {
|
|
// Username and password credentials.
|
|
PasswordCredentials *SignInRequest_PasswordCredentials `protobuf:"bytes,1,opt,name=password_credentials,json=passwordCredentials,proto3,oneof"`
|
|
}
|
|
|
|
type SignInRequest_SsoCredentials_ struct {
|
|
// SSO credentials from an OAuth2 authorization code flow.
|
|
SsoCredentials *SignInRequest_SsoCredentials `protobuf:"bytes,2,opt,name=sso_credentials,json=ssoCredentials,proto3,oneof"`
|
|
}
|
|
|
|
func (*SignInRequest_PasswordCredentials_) isSignInRequest_Credentials() {}
|
|
|
|
func (*SignInRequest_SsoCredentials_) isSignInRequest_Credentials() {}
|
|
|
|
// Response message for AuthService.SignIn.
|
|
type SignInResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// The signed-in user.
|
|
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
|
// The short-lived access token for API requests.
|
|
// Keep it in memory only, not in localStorage.
|
|
AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
|
// When the access token expires.
|
|
// Call RefreshToken before this time.
|
|
AccessTokenExpireTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=access_token_expire_time,json=accessTokenExpireTime,proto3" json:"access_token_expire_time,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SignInResponse) Reset() {
|
|
*x = SignInResponse{}
|
|
mi := &file_api_auth_service_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignInResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignInResponse) ProtoMessage() {}
|
|
|
|
func (x *SignInResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SignInResponse.ProtoReflect.Descriptor instead.
|
|
func (*SignInResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *SignInResponse) GetUser() *User {
|
|
if x != nil {
|
|
return x.User
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *SignInResponse) GetAccessToken() string {
|
|
if x != nil {
|
|
return x.AccessToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SignInResponse) GetAccessTokenExpireTime() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.AccessTokenExpireTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Request message for AuthService.RefreshToken.
|
|
// It has no fields: the refresh token is read from the HttpOnly cookie.
|
|
type RefreshTokenRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RefreshTokenRequest) Reset() {
|
|
*x = RefreshTokenRequest{}
|
|
mi := &file_api_auth_service_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RefreshTokenRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RefreshTokenRequest) ProtoMessage() {}
|
|
|
|
func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.
|
|
func (*RefreshTokenRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
// Response message for AuthService.RefreshToken.
|
|
type RefreshTokenResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// The new short-lived access token.
|
|
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
|
// When the new access token expires.
|
|
AccessTokenExpireTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=access_token_expire_time,json=accessTokenExpireTime,proto3" json:"access_token_expire_time,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RefreshTokenResponse) Reset() {
|
|
*x = RefreshTokenResponse{}
|
|
mi := &file_api_auth_service_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RefreshTokenResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RefreshTokenResponse) ProtoMessage() {}
|
|
|
|
func (x *RefreshTokenResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RefreshTokenResponse.ProtoReflect.Descriptor instead.
|
|
func (*RefreshTokenResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *RefreshTokenResponse) GetAccessToken() string {
|
|
if x != nil {
|
|
return x.AccessToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RefreshTokenResponse) GetAccessTokenExpireTime() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.AccessTokenExpireTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Request message for AuthService.GetCurrentUser.
|
|
type GetCurrentUserRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetCurrentUserRequest) Reset() {
|
|
*x = GetCurrentUserRequest{}
|
|
mi := &file_api_auth_service_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetCurrentUserRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetCurrentUserRequest) ProtoMessage() {}
|
|
|
|
func (x *GetCurrentUserRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetCurrentUserRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetCurrentUserRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
// Response message for AuthService.GetCurrentUser.
|
|
type GetCurrentUserResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// The authenticated user.
|
|
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetCurrentUserResponse) Reset() {
|
|
*x = GetCurrentUserResponse{}
|
|
mi := &file_api_auth_service_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetCurrentUserResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetCurrentUserResponse) ProtoMessage() {}
|
|
|
|
func (x *GetCurrentUserResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetCurrentUserResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetCurrentUserResponse) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *GetCurrentUserResponse) GetUser() *User {
|
|
if x != nil {
|
|
return x.User
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Request message for AuthService.SignOut.
|
|
type SignOutRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SignOutRequest) Reset() {
|
|
*x = SignOutRequest{}
|
|
mi := &file_api_auth_service_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignOutRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignOutRequest) ProtoMessage() {}
|
|
|
|
func (x *SignOutRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SignOutRequest.ProtoReflect.Descriptor instead.
|
|
func (*SignOutRequest) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
// PasswordCredentials are a username and password.
|
|
// Regular users cannot use them when the instance disallows password sign-in.
|
|
type SignInRequest_PasswordCredentials struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Required. The username to sign in with.
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
// Required. The password to sign in with.
|
|
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SignInRequest_PasswordCredentials) Reset() {
|
|
*x = SignInRequest_PasswordCredentials{}
|
|
mi := &file_api_auth_service_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignInRequest_PasswordCredentials) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignInRequest_PasswordCredentials) ProtoMessage() {}
|
|
|
|
func (x *SignInRequest_PasswordCredentials) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SignInRequest_PasswordCredentials.ProtoReflect.Descriptor instead.
|
|
func (*SignInRequest_PasswordCredentials) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{0, 0}
|
|
}
|
|
|
|
func (x *SignInRequest_PasswordCredentials) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SignInRequest_PasswordCredentials) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// SsoCredentials are the result of an OAuth2 authorization code flow with an identity provider.
|
|
// A first sign-in creates a local user unless the instance disallows user registration.
|
|
type SignInRequest_SsoCredentials struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Required. The resource name of the identity provider.
|
|
// Format: identity-providers/{idp}
|
|
IdentityProvider string `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
|
|
// Required. The authorization code returned by the identity provider.
|
|
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
|
|
// Required. The redirect URI used in the authorization request.
|
|
RedirectUri string `protobuf:"bytes,3,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"`
|
|
// Optional. The PKCE code verifier (RFC 7636). Set it when the authorization request used a code challenge.
|
|
CodeVerifier string `protobuf:"bytes,4,opt,name=code_verifier,json=codeVerifier,proto3" json:"code_verifier,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SignInRequest_SsoCredentials) Reset() {
|
|
*x = SignInRequest_SsoCredentials{}
|
|
mi := &file_api_auth_service_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SignInRequest_SsoCredentials) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SignInRequest_SsoCredentials) ProtoMessage() {}
|
|
|
|
func (x *SignInRequest_SsoCredentials) ProtoReflect() protoreflect.Message {
|
|
mi := &file_api_auth_service_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SignInRequest_SsoCredentials.ProtoReflect.Descriptor instead.
|
|
func (*SignInRequest_SsoCredentials) Descriptor() ([]byte, []int) {
|
|
return file_api_auth_service_proto_rawDescGZIP(), []int{0, 1}
|
|
}
|
|
|
|
func (x *SignInRequest_SsoCredentials) GetIdentityProvider() string {
|
|
if x != nil {
|
|
return x.IdentityProvider
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SignInRequest_SsoCredentials) GetCode() string {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SignInRequest_SsoCredentials) GetRedirectUri() string {
|
|
if x != nil {
|
|
return x.RedirectUri
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SignInRequest_SsoCredentials) GetCodeVerifier() string {
|
|
if x != nil {
|
|
return x.CodeVerifier
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_api_auth_service_proto protoreflect.FileDescriptor
|
|
|
|
const file_api_auth_service_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x16api/auth_service.proto\x12\tmemos.api\x1a\x16api/user_service.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfd\x03\n" +
|
|
"\rSignInRequest\x12a\n" +
|
|
"\x14password_credentials\x18\x01 \x01(\v2,.memos.api.SignInRequest.PasswordCredentialsH\x00R\x13passwordCredentials\x12R\n" +
|
|
"\x0fsso_credentials\x18\x02 \x01(\v2'.memos.api.SignInRequest.SsoCredentialsH\x00R\x0essoCredentials\x1aW\n" +
|
|
"\x13PasswordCredentials\x12\x1f\n" +
|
|
"\busername\x18\x01 \x01(\tB\x03\xe0A\x02R\busername\x12\x1f\n" +
|
|
"\bpassword\x18\x02 \x01(\tB\x03\xe0A\x02R\bpassword\x1a\xcc\x01\n" +
|
|
"\x0eSsoCredentials\x12O\n" +
|
|
"\x11identity_provider\x18\x01 \x01(\tB\"\xe0A\x02\xfaA\x1c\n" +
|
|
"\x1amemos.api/IdentityProviderR\x10identityProvider\x12\x17\n" +
|
|
"\x04code\x18\x02 \x01(\tB\x03\xe0A\x02R\x04code\x12&\n" +
|
|
"\fredirect_uri\x18\x03 \x01(\tB\x03\xe0A\x02R\vredirectUri\x12(\n" +
|
|
"\rcode_verifier\x18\x04 \x01(\tB\x03\xe0A\x01R\fcodeVerifierB\r\n" +
|
|
"\vcredentials\"\xad\x01\n" +
|
|
"\x0eSignInResponse\x12#\n" +
|
|
"\x04user\x18\x01 \x01(\v2\x0f.memos.api.UserR\x04user\x12!\n" +
|
|
"\faccess_token\x18\x02 \x01(\tR\vaccessToken\x12S\n" +
|
|
"\x18access_token_expire_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x15accessTokenExpireTime\"\x15\n" +
|
|
"\x13RefreshTokenRequest\"\x8e\x01\n" +
|
|
"\x14RefreshTokenResponse\x12!\n" +
|
|
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12S\n" +
|
|
"\x18access_token_expire_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x15accessTokenExpireTime\"\x17\n" +
|
|
"\x15GetCurrentUserRequest\"=\n" +
|
|
"\x16GetCurrentUserResponse\x12#\n" +
|
|
"\x04user\x18\x01 \x01(\v2\x0f.memos.api.UserR\x04user\"\x10\n" +
|
|
"\x0eSignOutRequest2\x9e\x03\n" +
|
|
"\vAuthService\x12Z\n" +
|
|
"\x06SignIn\x12\x18.memos.api.SignInRequest\x1a\x19.memos.api.SignInResponse\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/api/auth/signin\x12m\n" +
|
|
"\fRefreshToken\x12\x1e.memos.api.RefreshTokenRequest\x1a\x1f.memos.api.RefreshTokenResponse\"\x1c\x82\xd3\xe4\x93\x02\x16:\x01*\"\x11/api/auth/refresh\x12k\n" +
|
|
"\x0eGetCurrentUser\x12 .memos.api.GetCurrentUserRequest\x1a!.memos.api.GetCurrentUserResponse\"\x14\x82\xd3\xe4\x93\x02\x0e\x12\f/api/auth/me\x12W\n" +
|
|
"\aSignOut\x12\x19.memos.api.SignOutRequest\x1a\x16.google.protobuf.Empty\"\x19\x82\xd3\xe4\x93\x02\x13\"\x11/api/auth/signoutB\x8f\x01\n" +
|
|
"\rcom.memos.apiB\x10AuthServiceProtoP\x01Z'github.com/usememos/memos/proto/gen/api\xa2\x02\x03MAX\xaa\x02\tMemos.Api\xca\x02\tMemos\\Api\xe2\x02\x15Memos\\Api\\GPBMetadata\xea\x02\n" +
|
|
"Memos::Apib\x06proto3"
|
|
|
|
var (
|
|
file_api_auth_service_proto_rawDescOnce sync.Once
|
|
file_api_auth_service_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_api_auth_service_proto_rawDescGZIP() []byte {
|
|
file_api_auth_service_proto_rawDescOnce.Do(func() {
|
|
file_api_auth_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_auth_service_proto_rawDesc), len(file_api_auth_service_proto_rawDesc)))
|
|
})
|
|
return file_api_auth_service_proto_rawDescData
|
|
}
|
|
|
|
var file_api_auth_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
|
var file_api_auth_service_proto_goTypes = []any{
|
|
(*SignInRequest)(nil), // 0: memos.api.SignInRequest
|
|
(*SignInResponse)(nil), // 1: memos.api.SignInResponse
|
|
(*RefreshTokenRequest)(nil), // 2: memos.api.RefreshTokenRequest
|
|
(*RefreshTokenResponse)(nil), // 3: memos.api.RefreshTokenResponse
|
|
(*GetCurrentUserRequest)(nil), // 4: memos.api.GetCurrentUserRequest
|
|
(*GetCurrentUserResponse)(nil), // 5: memos.api.GetCurrentUserResponse
|
|
(*SignOutRequest)(nil), // 6: memos.api.SignOutRequest
|
|
(*SignInRequest_PasswordCredentials)(nil), // 7: memos.api.SignInRequest.PasswordCredentials
|
|
(*SignInRequest_SsoCredentials)(nil), // 8: memos.api.SignInRequest.SsoCredentials
|
|
(*User)(nil), // 9: memos.api.User
|
|
(*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
|
|
(*emptypb.Empty)(nil), // 11: google.protobuf.Empty
|
|
}
|
|
var file_api_auth_service_proto_depIdxs = []int32{
|
|
7, // 0: memos.api.SignInRequest.password_credentials:type_name -> memos.api.SignInRequest.PasswordCredentials
|
|
8, // 1: memos.api.SignInRequest.sso_credentials:type_name -> memos.api.SignInRequest.SsoCredentials
|
|
9, // 2: memos.api.SignInResponse.user:type_name -> memos.api.User
|
|
10, // 3: memos.api.SignInResponse.access_token_expire_time:type_name -> google.protobuf.Timestamp
|
|
10, // 4: memos.api.RefreshTokenResponse.access_token_expire_time:type_name -> google.protobuf.Timestamp
|
|
9, // 5: memos.api.GetCurrentUserResponse.user:type_name -> memos.api.User
|
|
0, // 6: memos.api.AuthService.SignIn:input_type -> memos.api.SignInRequest
|
|
2, // 7: memos.api.AuthService.RefreshToken:input_type -> memos.api.RefreshTokenRequest
|
|
4, // 8: memos.api.AuthService.GetCurrentUser:input_type -> memos.api.GetCurrentUserRequest
|
|
6, // 9: memos.api.AuthService.SignOut:input_type -> memos.api.SignOutRequest
|
|
1, // 10: memos.api.AuthService.SignIn:output_type -> memos.api.SignInResponse
|
|
3, // 11: memos.api.AuthService.RefreshToken:output_type -> memos.api.RefreshTokenResponse
|
|
5, // 12: memos.api.AuthService.GetCurrentUser:output_type -> memos.api.GetCurrentUserResponse
|
|
11, // 13: memos.api.AuthService.SignOut:output_type -> google.protobuf.Empty
|
|
10, // [10:14] is the sub-list for method output_type
|
|
6, // [6:10] is the sub-list for method input_type
|
|
6, // [6:6] is the sub-list for extension type_name
|
|
6, // [6:6] is the sub-list for extension extendee
|
|
0, // [0:6] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_api_auth_service_proto_init() }
|
|
func file_api_auth_service_proto_init() {
|
|
if File_api_auth_service_proto != nil {
|
|
return
|
|
}
|
|
file_api_user_service_proto_init()
|
|
file_api_auth_service_proto_msgTypes[0].OneofWrappers = []any{
|
|
(*SignInRequest_PasswordCredentials_)(nil),
|
|
(*SignInRequest_SsoCredentials_)(nil),
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_auth_service_proto_rawDesc), len(file_api_auth_service_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 9,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_api_auth_service_proto_goTypes,
|
|
DependencyIndexes: file_api_auth_service_proto_depIdxs,
|
|
MessageInfos: file_api_auth_service_proto_msgTypes,
|
|
}.Build()
|
|
File_api_auth_service_proto = out.File
|
|
file_api_auth_service_proto_goTypes = nil
|
|
file_api_auth_service_proto_depIdxs = nil
|
|
}
|