Documentation ¶
Index ¶
- Variables
- func RegisterOAuthServiceServer(s grpc.ServiceRegistrar, srv OAuthServiceServer)
- type AuthorizeRequest
- func (*AuthorizeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthorizeRequest) GetClientId() string
- func (x *AuthorizeRequest) GetClientSecret() string
- func (x *AuthorizeRequest) GetCodeChallenge() string
- func (x *AuthorizeRequest) GetCodeChallengeMethod() CodeChallengeMethod
- func (x *AuthorizeRequest) GetRedirectUri() string
- func (x *AuthorizeRequest) GetResponseType() ResponseType
- func (x *AuthorizeRequest) GetScopes() []*Scope
- func (x *AuthorizeRequest) GetState() string
- func (*AuthorizeRequest) ProtoMessage()
- func (x *AuthorizeRequest) ProtoReflect() protoreflect.Message
- func (x *AuthorizeRequest) Reset()
- func (x *AuthorizeRequest) String() string
- type AuthorizeResponse
- func (*AuthorizeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthorizeResponse) GetCode() string
- func (x *AuthorizeResponse) GetState() string
- func (*AuthorizeResponse) ProtoMessage()
- func (x *AuthorizeResponse) ProtoReflect() protoreflect.Message
- func (x *AuthorizeResponse) Reset()
- func (x *AuthorizeResponse) String() string
- type CodeChallengeMethod
- func (CodeChallengeMethod) Descriptor() protoreflect.EnumDescriptor
- func (x CodeChallengeMethod) Enum() *CodeChallengeMethod
- func (CodeChallengeMethod) EnumDescriptor() ([]byte, []int)deprecated
- func (x CodeChallengeMethod) Number() protoreflect.EnumNumber
- func (x CodeChallengeMethod) String() string
- func (CodeChallengeMethod) Type() protoreflect.EnumType
- type GrantType
- type InstropectRequest
- type InstropectResponse
- func (*InstropectResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InstropectResponse) GetActive() bool
- func (x *InstropectResponse) GetExpiresIn() int32
- func (x *InstropectResponse) GetScopes() []*Scope
- func (x *InstropectResponse) GetTokenType() TokenType
- func (x *InstropectResponse) GetUsername() string
- func (*InstropectResponse) ProtoMessage()
- func (x *InstropectResponse) ProtoReflect() protoreflect.Message
- func (x *InstropectResponse) Reset()
- func (x *InstropectResponse) String() string
- type OAuthServiceClient
- type OAuthServiceServer
- type ResponseType
- func (ResponseType) Descriptor() protoreflect.EnumDescriptor
- func (x ResponseType) Enum() *ResponseType
- func (ResponseType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResponseType) Number() protoreflect.EnumNumber
- func (x ResponseType) String() string
- func (ResponseType) Type() protoreflect.EnumType
- type Scope
- type ScopeGrant
- type ScopeType
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetAccessToken() string
- func (x *Token) GetExpiresIn() int32
- func (x *Token) GetRefreshToken() string
- func (x *Token) GetScopes() []*Scope
- func (x *Token) GetTokenType() TokenType
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- type TokenRequest
- func (*TokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TokenRequest) GetClientId() string
- func (x *TokenRequest) GetClientSecret() string
- func (x *TokenRequest) GetCode() string
- func (x *TokenRequest) GetCodeVerifier() string
- func (x *TokenRequest) GetGrantType() GrantType
- func (x *TokenRequest) GetRedirectUri() string
- func (x *TokenRequest) GetRefreshToken() string
- func (x *TokenRequest) GetScopes() []*Scope
- func (*TokenRequest) ProtoMessage()
- func (x *TokenRequest) ProtoReflect() protoreflect.Message
- func (x *TokenRequest) Reset()
- func (x *TokenRequest) String() string
- type TokenResponse
- type TokenType
- type UnimplementedOAuthServiceServer
- func (UnimplementedOAuthServiceServer) Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error)
- func (UnimplementedOAuthServiceServer) Instropect(context.Context, *InstropectRequest) (*InstropectResponse, error)
- func (UnimplementedOAuthServiceServer) Token(context.Context, *TokenRequest) (*TokenResponse, error)
- type UnsafeOAuthServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( ResponseType_name = map[int32]string{ 0: "CODE", } ResponseType_value = map[string]int32{ "CODE": 0, } )
Enum value maps for ResponseType.
var ( ScopeGrant_name = map[int32]string{ 0: "RW", 1: "RO", } ScopeGrant_value = map[string]int32{ "RW": 0, "RO": 1, } )
Enum value maps for ScopeGrant.
var ( ScopeType_name = map[int32]string{ 0: "ACCOUNT", } ScopeType_value = map[string]int32{ "ACCOUNT": 0, } )
Enum value maps for ScopeType.
var ( CodeChallengeMethod_name = map[int32]string{ 0: "S256", } CodeChallengeMethod_value = map[string]int32{ "S256": 0, } )
Enum value maps for CodeChallengeMethod.
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.
var ( TokenType_name = map[int32]string{ 0: "BEARER", } TokenType_value = map[string]int32{ "BEARER": 0, } )
Enum value maps for TokenType.
var File_oauth_oauth_proto protoreflect.FileDescriptor
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) Descriptor() protoreflect.EnumDescriptor
func (CodeChallengeMethod) Enum ¶
func (x CodeChallengeMethod) Enum() *CodeChallengeMethod
func (CodeChallengeMethod) EnumDescriptor
deprecated
func (CodeChallengeMethod) EnumDescriptor() ([]byte, []int)
Deprecated: Use CodeChallengeMethod.Descriptor instead.
func (CodeChallengeMethod) Number ¶
func (x CodeChallengeMethod) Number() protoreflect.EnumNumber
func (CodeChallengeMethod) String ¶
func (x CodeChallengeMethod) String() string
func (CodeChallengeMethod) Type ¶
func (CodeChallengeMethod) Type() protoreflect.EnumType
type GrantType ¶
type GrantType int32
func (GrantType) Descriptor ¶
func (GrantType) Descriptor() protoreflect.EnumDescriptor
func (GrantType) EnumDescriptor
deprecated
func (GrantType) Number ¶
func (x GrantType) Number() protoreflect.EnumNumber
func (GrantType) Type ¶
func (GrantType) Type() protoreflect.EnumType
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.
func NewOAuthServiceClient ¶
func NewOAuthServiceClient(cc grpc.ClientConnInterface) OAuthServiceClient
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) Descriptor() protoreflect.EnumDescriptor
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 (x ResponseType) Number() protoreflect.EnumNumber
func (ResponseType) String ¶
func (x ResponseType) String() string
func (ResponseType) Type ¶
func (ResponseType) Type() protoreflect.EnumType
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) GetGrant ¶
func (x *Scope) GetGrant() ScopeGrant
func (*Scope) ProtoMessage ¶
func (*Scope) ProtoMessage()
func (*Scope) ProtoReflect ¶
func (x *Scope) ProtoReflect() protoreflect.Message
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 ¶
func (ScopeGrant) Type() protoreflect.EnumType
type ScopeType ¶
type ScopeType int32
const (
ScopeType_ACCOUNT ScopeType = 0
)
func (ScopeType) Descriptor ¶
func (ScopeType) Descriptor() protoreflect.EnumDescriptor
func (ScopeType) EnumDescriptor
deprecated
func (ScopeType) Number ¶
func (x ScopeType) Number() protoreflect.EnumNumber
func (ScopeType) Type ¶
func (ScopeType) Type() protoreflect.EnumType
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) GetAccessToken ¶
func (*Token) GetExpiresIn ¶
func (*Token) GetRefreshToken ¶
func (*Token) GetTokenType ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
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) EnumDescriptor
deprecated
func (TokenType) Number ¶
func (x TokenType) Number() protoreflect.EnumNumber
func (TokenType) Type ¶
func (TokenType) Type() protoreflect.EnumType
type UnimplementedOAuthServiceServer ¶
type UnimplementedOAuthServiceServer struct { }
UnimplementedOAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOAuthServiceServer) Authorize ¶
func (UnimplementedOAuthServiceServer) Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error)
func (UnimplementedOAuthServiceServer) Instropect ¶
func (UnimplementedOAuthServiceServer) Instropect(context.Context, *InstropectRequest) (*InstropectResponse, error)
func (UnimplementedOAuthServiceServer) Token ¶
func (UnimplementedOAuthServiceServer) Token(context.Context, *TokenRequest) (*TokenResponse, error)
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.