proto

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2022 License: GPL-2.0, GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResponseType_name = map[int32]string{
		0: "CODE",
	}
	ResponseType_value = map[string]int32{
		"CODE": 0,
	}
)

Enum value maps for ResponseType.

View Source
var (
	ScopeGrant_name = map[int32]string{
		0: "RW",
		1: "RO",
	}
	ScopeGrant_value = map[string]int32{
		"RW": 0,
		"RO": 1,
	}
)

Enum value maps for ScopeGrant.

View Source
var (
	ScopeType_name = map[int32]string{
		0: "ACCOUNT",
	}
	ScopeType_value = map[string]int32{
		"ACCOUNT": 0,
	}
)

Enum value maps for ScopeType.

View Source
var (
	CodeChallengeMethod_name = map[int32]string{
		0: "S256",
	}
	CodeChallengeMethod_value = map[string]int32{
		"S256": 0,
	}
)

Enum value maps for CodeChallengeMethod.

View Source
var (
	GrantType_name = map[int32]string{
		0: "AUTHORIZATION_CODE",
		1: "REFRESH_TOKEN",
		2: "CLIENT_CREDENTIALS",
	}
	GrantType_value = map[string]int32{
		"AUTHORIZATION_CODE": 0,
		"REFRESH_TOKEN":      1,
		"CLIENT_CREDENTIALS": 2,
	}
)

Enum value maps for GrantType.

View Source
var (
	TokenType_name = map[int32]string{
		0: "BEARER",
	}
	TokenType_value = map[string]int32{
		"BEARER": 0,
	}
)

Enum value maps for TokenType.

View Source
var File_oauth_oauth_proto protoreflect.FileDescriptor
View Source
var OAuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "oauth.OAuthService",
	HandlerType: (*OAuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authorize",
			Handler:    _OAuthService_Authorize_Handler,
		},
		{
			MethodName: "Token",
			Handler:    _OAuthService_Token_Handler,
		},
		{
			MethodName: "Instropect",
			Handler:    _OAuthService_Instropect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "oauth/oauth.proto",
}

OAuthService_ServiceDesc is the grpc.ServiceDesc for OAuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOAuthServiceServer

func RegisterOAuthServiceServer(s grpc.ServiceRegistrar, srv OAuthServiceServer)

Types

type AuthorizeRequest

type AuthorizeRequest struct {
	ResponseType        ResponseType        `protobuf:"varint,1,opt,name=response_type,json=responseType,proto3,enum=oauth.ResponseType" json:"response_type,omitempty"`
	ClientId            string              `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	ClientSecret        string              `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	RedirectUri         string              `protobuf:"bytes,4,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"`
	Scopes              []*Scope            `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"`
	State               string              `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
	CodeChallenge       string              `protobuf:"bytes,7,opt,name=code_challenge,json=codeChallenge,proto3" json:"code_challenge,omitempty"`
	CodeChallengeMethod CodeChallengeMethod `` /* 152-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*AuthorizeRequest) Descriptor deprecated

func (*AuthorizeRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthorizeRequest.ProtoReflect.Descriptor instead.

func (*AuthorizeRequest) GetClientId

func (x *AuthorizeRequest) GetClientId() string

func (*AuthorizeRequest) GetClientSecret

func (x *AuthorizeRequest) GetClientSecret() string

func (*AuthorizeRequest) GetCodeChallenge

func (x *AuthorizeRequest) GetCodeChallenge() string

func (*AuthorizeRequest) GetCodeChallengeMethod

func (x *AuthorizeRequest) GetCodeChallengeMethod() CodeChallengeMethod

func (*AuthorizeRequest) GetRedirectUri

func (x *AuthorizeRequest) GetRedirectUri() string

func (*AuthorizeRequest) GetResponseType

func (x *AuthorizeRequest) GetResponseType() ResponseType

func (*AuthorizeRequest) GetScopes

func (x *AuthorizeRequest) GetScopes() []*Scope

func (*AuthorizeRequest) GetState

func (x *AuthorizeRequest) GetState() string

func (*AuthorizeRequest) ProtoMessage

func (*AuthorizeRequest) ProtoMessage()

func (*AuthorizeRequest) ProtoReflect

func (x *AuthorizeRequest) ProtoReflect() protoreflect.Message

func (*AuthorizeRequest) Reset

func (x *AuthorizeRequest) Reset()

func (*AuthorizeRequest) String

func (x *AuthorizeRequest) String() string

type AuthorizeResponse

type AuthorizeResponse struct {
	State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	Code  string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizeResponse) Descriptor deprecated

func (*AuthorizeResponse) Descriptor() ([]byte, []int)

Deprecated: Use AuthorizeResponse.ProtoReflect.Descriptor instead.

func (*AuthorizeResponse) GetCode

func (x *AuthorizeResponse) GetCode() string

func (*AuthorizeResponse) GetState

func (x *AuthorizeResponse) GetState() string

func (*AuthorizeResponse) ProtoMessage

func (*AuthorizeResponse) ProtoMessage()

func (*AuthorizeResponse) ProtoReflect

func (x *AuthorizeResponse) ProtoReflect() protoreflect.Message

func (*AuthorizeResponse) Reset

func (x *AuthorizeResponse) Reset()

func (*AuthorizeResponse) String

func (x *AuthorizeResponse) String() string

type CodeChallengeMethod

type CodeChallengeMethod int32
const (
	CodeChallengeMethod_S256 CodeChallengeMethod = 0
)

func (CodeChallengeMethod) Descriptor

func (CodeChallengeMethod) Enum

func (CodeChallengeMethod) EnumDescriptor deprecated

func (CodeChallengeMethod) EnumDescriptor() ([]byte, []int)

Deprecated: Use CodeChallengeMethod.Descriptor instead.

func (CodeChallengeMethod) Number

func (CodeChallengeMethod) String

func (x CodeChallengeMethod) String() string

func (CodeChallengeMethod) Type

type GrantType

type GrantType int32
const (
	GrantType_AUTHORIZATION_CODE GrantType = 0
	GrantType_REFRESH_TOKEN      GrantType = 1
	GrantType_CLIENT_CREDENTIALS GrantType = 2
)

func (GrantType) Descriptor

func (GrantType) Descriptor() protoreflect.EnumDescriptor

func (GrantType) Enum

func (x GrantType) Enum() *GrantType

func (GrantType) EnumDescriptor deprecated

func (GrantType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GrantType.Descriptor instead.

func (GrantType) Number

func (x GrantType) Number() protoreflect.EnumNumber

func (GrantType) String

func (x GrantType) String() string

func (GrantType) Type

type InstropectRequest

type InstropectRequest struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*InstropectRequest) Descriptor deprecated

func (*InstropectRequest) Descriptor() ([]byte, []int)

Deprecated: Use InstropectRequest.ProtoReflect.Descriptor instead.

func (*InstropectRequest) GetToken

func (x *InstropectRequest) GetToken() string

func (*InstropectRequest) ProtoMessage

func (*InstropectRequest) ProtoMessage()

func (*InstropectRequest) ProtoReflect

func (x *InstropectRequest) ProtoReflect() protoreflect.Message

func (*InstropectRequest) Reset

func (x *InstropectRequest) Reset()

func (*InstropectRequest) String

func (x *InstropectRequest) String() string

type InstropectResponse

type InstropectResponse struct {
	Active    bool      `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
	TokenType TokenType `protobuf:"varint,2,opt,name=token_type,json=tokenType,proto3,enum=oauth.TokenType" json:"token_type,omitempty"`
	Username  string    `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	ExpiresIn int32     `protobuf:"varint,4,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
	Scopes    []*Scope  `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*InstropectResponse) Descriptor deprecated

func (*InstropectResponse) Descriptor() ([]byte, []int)

Deprecated: Use InstropectResponse.ProtoReflect.Descriptor instead.

func (*InstropectResponse) GetActive

func (x *InstropectResponse) GetActive() bool

func (*InstropectResponse) GetExpiresIn

func (x *InstropectResponse) GetExpiresIn() int32

func (*InstropectResponse) GetScopes

func (x *InstropectResponse) GetScopes() []*Scope

func (*InstropectResponse) GetTokenType

func (x *InstropectResponse) GetTokenType() TokenType

func (*InstropectResponse) GetUsername

func (x *InstropectResponse) GetUsername() string

func (*InstropectResponse) ProtoMessage

func (*InstropectResponse) ProtoMessage()

func (*InstropectResponse) ProtoReflect

func (x *InstropectResponse) ProtoReflect() protoreflect.Message

func (*InstropectResponse) Reset

func (x *InstropectResponse) Reset()

func (*InstropectResponse) String

func (x *InstropectResponse) String() string

type OAuthServiceClient

type OAuthServiceClient interface {
	Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*AuthorizeResponse, error)
	Token(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error)
	Instropect(ctx context.Context, in *InstropectRequest, opts ...grpc.CallOption) (*InstropectResponse, error)
}

OAuthServiceClient is the client API for OAuthService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type OAuthServiceServer

type OAuthServiceServer interface {
	Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error)
	Token(context.Context, *TokenRequest) (*TokenResponse, error)
	Instropect(context.Context, *InstropectRequest) (*InstropectResponse, error)
	// contains filtered or unexported methods
}

OAuthServiceServer is the server API for OAuthService service. All implementations must embed UnimplementedOAuthServiceServer for forward compatibility

type ResponseType

type ResponseType int32
const (
	ResponseType_CODE ResponseType = 0
)

func (ResponseType) Descriptor

func (ResponseType) Enum

func (x ResponseType) Enum() *ResponseType

func (ResponseType) EnumDescriptor deprecated

func (ResponseType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResponseType.Descriptor instead.

func (ResponseType) Number

func (ResponseType) String

func (x ResponseType) String() string

func (ResponseType) Type

type Scope

type Scope struct {
	Type  ScopeType  `protobuf:"varint,1,opt,name=type,proto3,enum=oauth.ScopeType" json:"type,omitempty"`
	Grant ScopeGrant `protobuf:"varint,2,opt,name=grant,proto3,enum=oauth.ScopeGrant" json:"grant,omitempty"`
	// contains filtered or unexported fields
}

func (*Scope) Descriptor deprecated

func (*Scope) Descriptor() ([]byte, []int)

Deprecated: Use Scope.ProtoReflect.Descriptor instead.

func (*Scope) GetGrant

func (x *Scope) GetGrant() ScopeGrant

func (*Scope) GetType

func (x *Scope) GetType() ScopeType

func (*Scope) ProtoMessage

func (*Scope) ProtoMessage()

func (*Scope) ProtoReflect

func (x *Scope) ProtoReflect() protoreflect.Message

func (*Scope) Reset

func (x *Scope) Reset()

func (*Scope) String

func (x *Scope) String() string

type ScopeGrant

type ScopeGrant int32
const (
	ScopeGrant_RW ScopeGrant = 0
	ScopeGrant_RO ScopeGrant = 1
)

func (ScopeGrant) Descriptor

func (ScopeGrant) Descriptor() protoreflect.EnumDescriptor

func (ScopeGrant) Enum

func (x ScopeGrant) Enum() *ScopeGrant

func (ScopeGrant) EnumDescriptor deprecated

func (ScopeGrant) EnumDescriptor() ([]byte, []int)

Deprecated: Use ScopeGrant.Descriptor instead.

func (ScopeGrant) Number

func (x ScopeGrant) Number() protoreflect.EnumNumber

func (ScopeGrant) String

func (x ScopeGrant) String() string

func (ScopeGrant) Type

type ScopeType

type ScopeType int32
const (
	ScopeType_ACCOUNT ScopeType = 0
)

func (ScopeType) Descriptor

func (ScopeType) Descriptor() protoreflect.EnumDescriptor

func (ScopeType) Enum

func (x ScopeType) Enum() *ScopeType

func (ScopeType) EnumDescriptor deprecated

func (ScopeType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ScopeType.Descriptor instead.

func (ScopeType) Number

func (x ScopeType) Number() protoreflect.EnumNumber

func (ScopeType) String

func (x ScopeType) String() string

func (ScopeType) Type

type Token

type Token struct {
	TokenType    TokenType `protobuf:"varint,1,opt,name=token_type,json=tokenType,proto3,enum=oauth.TokenType" json:"token_type,omitempty"`
	ExpiresIn    int32     `protobuf:"varint,2,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
	AccessToken  string    `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	Scopes       []*Scope  `protobuf:"bytes,4,rep,name=scopes,proto3" json:"scopes,omitempty"`
	RefreshToken string    `protobuf:"bytes,5,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*Token) Descriptor deprecated

func (*Token) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAccessToken

func (x *Token) GetAccessToken() string

func (*Token) GetExpiresIn

func (x *Token) GetExpiresIn() int32

func (*Token) GetRefreshToken

func (x *Token) GetRefreshToken() string

func (*Token) GetScopes

func (x *Token) GetScopes() []*Scope

func (*Token) GetTokenType

func (x *Token) GetTokenType() TokenType

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type TokenRequest

type TokenRequest struct {
	GrantType    GrantType `protobuf:"varint,1,opt,name=grant_type,json=grantType,proto3,enum=oauth.GrantType" json:"grant_type,omitempty"`
	ClientId     string    `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	ClientSecret string    `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	RedirectUri  string    `protobuf:"bytes,4,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"`
	RefreshToken string    `protobuf:"bytes,5,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	Scopes       []*Scope  `protobuf:"bytes,6,rep,name=scopes,proto3" json:"scopes,omitempty"`
	Code         string    `protobuf:"bytes,7,opt,name=code,proto3" json:"code,omitempty"`
	CodeVerifier string    `protobuf:"bytes,8,opt,name=code_verifier,json=codeVerifier,proto3" json:"code_verifier,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenRequest) Descriptor deprecated

func (*TokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use TokenRequest.ProtoReflect.Descriptor instead.

func (*TokenRequest) GetClientId

func (x *TokenRequest) GetClientId() string

func (*TokenRequest) GetClientSecret

func (x *TokenRequest) GetClientSecret() string

func (*TokenRequest) GetCode

func (x *TokenRequest) GetCode() string

func (*TokenRequest) GetCodeVerifier

func (x *TokenRequest) GetCodeVerifier() string

func (*TokenRequest) GetGrantType

func (x *TokenRequest) GetGrantType() GrantType

func (*TokenRequest) GetRedirectUri

func (x *TokenRequest) GetRedirectUri() string

func (*TokenRequest) GetRefreshToken

func (x *TokenRequest) GetRefreshToken() string

func (*TokenRequest) GetScopes

func (x *TokenRequest) GetScopes() []*Scope

func (*TokenRequest) ProtoMessage

func (*TokenRequest) ProtoMessage()

func (*TokenRequest) ProtoReflect

func (x *TokenRequest) ProtoReflect() protoreflect.Message

func (*TokenRequest) Reset

func (x *TokenRequest) Reset()

func (*TokenRequest) String

func (x *TokenRequest) String() string

type TokenResponse

type TokenResponse struct {
	Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenResponse) Descriptor deprecated

func (*TokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use TokenResponse.ProtoReflect.Descriptor instead.

func (*TokenResponse) GetToken

func (x *TokenResponse) GetToken() *Token

func (*TokenResponse) ProtoMessage

func (*TokenResponse) ProtoMessage()

func (*TokenResponse) ProtoReflect

func (x *TokenResponse) ProtoReflect() protoreflect.Message

func (*TokenResponse) Reset

func (x *TokenResponse) Reset()

func (*TokenResponse) String

func (x *TokenResponse) String() string

type TokenType

type TokenType int32
const (
	TokenType_BEARER TokenType = 0
)

func (TokenType) Descriptor

func (TokenType) Descriptor() protoreflect.EnumDescriptor

func (TokenType) Enum

func (x TokenType) Enum() *TokenType

func (TokenType) EnumDescriptor deprecated

func (TokenType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TokenType.Descriptor instead.

func (TokenType) Number

func (x TokenType) Number() protoreflect.EnumNumber

func (TokenType) String

func (x TokenType) String() string

func (TokenType) Type

type UnimplementedOAuthServiceServer

type UnimplementedOAuthServiceServer struct {
}

UnimplementedOAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedOAuthServiceServer) Authorize

func (UnimplementedOAuthServiceServer) Instropect

func (UnimplementedOAuthServiceServer) Token

type UnsafeOAuthServiceServer

type UnsafeOAuthServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeOAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OAuthServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL