oauth

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_oauth_proto protoreflect.FileDescriptor

Functions

func NewOauthEndpoints

func NewOauthEndpoints() []*api.Endpoint

func RegisterOauthHandler

func RegisterOauthHandler(s server.Server, hdlr OauthHandler, opts ...server.HandlerOption) error

Types

type AuthToken

type AuthToken struct {
	AccessToken  string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	Created      int64  `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
	Expiry       int64  `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

lifted from https://github.com/micro/go-micro/blob/master/auth/service/proto/auth.proto

func (*AuthToken) Descriptor deprecated

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

Deprecated: Use AuthToken.ProtoReflect.Descriptor instead.

func (*AuthToken) GetAccessToken

func (x *AuthToken) GetAccessToken() string

func (*AuthToken) GetCreated

func (x *AuthToken) GetCreated() int64

func (*AuthToken) GetExpiry

func (x *AuthToken) GetExpiry() int64

func (*AuthToken) GetRefreshToken

func (x *AuthToken) GetRefreshToken() string

func (*AuthToken) ProtoMessage

func (*AuthToken) ProtoMessage()

func (*AuthToken) ProtoReflect

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

func (*AuthToken) Reset

func (x *AuthToken) Reset()

func (*AuthToken) String

func (x *AuthToken) String() string

type GithubLoginRequest

type GithubLoginRequest 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"`
	ErrorReason string `protobuf:"bytes,3,opt,name=errorReason,proto3" json:"errorReason,omitempty"`
	Test        bool   `protobuf:"varint,4,opt,name=test,proto3" json:"test,omitempty"`
	// contains filtered or unexported fields
}

func (*GithubLoginRequest) Descriptor deprecated

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

Deprecated: Use GithubLoginRequest.ProtoReflect.Descriptor instead.

func (*GithubLoginRequest) GetCode

func (x *GithubLoginRequest) GetCode() string

func (*GithubLoginRequest) GetErrorReason

func (x *GithubLoginRequest) GetErrorReason() string

func (*GithubLoginRequest) GetState

func (x *GithubLoginRequest) GetState() string

func (*GithubLoginRequest) GetTest

func (x *GithubLoginRequest) GetTest() bool

func (*GithubLoginRequest) ProtoMessage

func (*GithubLoginRequest) ProtoMessage()

func (*GithubLoginRequest) ProtoReflect

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

func (*GithubLoginRequest) Reset

func (x *GithubLoginRequest) Reset()

func (*GithubLoginRequest) String

func (x *GithubLoginRequest) String() string

type GithubURLRequest

type GithubURLRequest struct {
	Test bool `protobuf:"varint,1,opt,name=test,proto3" json:"test,omitempty"`
	// contains filtered or unexported fields
}

func (*GithubURLRequest) Descriptor deprecated

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

Deprecated: Use GithubURLRequest.ProtoReflect.Descriptor instead.

func (*GithubURLRequest) GetTest

func (x *GithubURLRequest) GetTest() bool

func (*GithubURLRequest) ProtoMessage

func (*GithubURLRequest) ProtoMessage()

func (*GithubURLRequest) ProtoReflect

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

func (*GithubURLRequest) Reset

func (x *GithubURLRequest) Reset()

func (*GithubURLRequest) String

func (x *GithubURLRequest) String() string

type GithubURLResponse

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

func (*GithubURLResponse) Descriptor deprecated

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

Deprecated: Use GithubURLResponse.ProtoReflect.Descriptor instead.

func (*GithubURLResponse) GetUrl

func (x *GithubURLResponse) GetUrl() string

func (*GithubURLResponse) ProtoMessage

func (*GithubURLResponse) ProtoMessage()

func (*GithubURLResponse) ProtoReflect

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

func (*GithubURLResponse) Reset

func (x *GithubURLResponse) Reset()

func (*GithubURLResponse) String

func (x *GithubURLResponse) String() string

type GoogleLoginRequest

type GoogleLoginRequest 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"`
	ErrorReason string `protobuf:"bytes,3,opt,name=errorReason,proto3" json:"errorReason,omitempty"`
	Test        bool   `protobuf:"varint,4,opt,name=test,proto3" json:"test,omitempty"`
	// contains filtered or unexported fields
}

func (*GoogleLoginRequest) Descriptor deprecated

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

Deprecated: Use GoogleLoginRequest.ProtoReflect.Descriptor instead.

func (*GoogleLoginRequest) GetCode

func (x *GoogleLoginRequest) GetCode() string

func (*GoogleLoginRequest) GetErrorReason

func (x *GoogleLoginRequest) GetErrorReason() string

func (*GoogleLoginRequest) GetState

func (x *GoogleLoginRequest) GetState() string

func (*GoogleLoginRequest) GetTest

func (x *GoogleLoginRequest) GetTest() bool

func (*GoogleLoginRequest) ProtoMessage

func (*GoogleLoginRequest) ProtoMessage()

func (*GoogleLoginRequest) ProtoReflect

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

func (*GoogleLoginRequest) Reset

func (x *GoogleLoginRequest) Reset()

func (*GoogleLoginRequest) String

func (x *GoogleLoginRequest) String() string

type GoogleURLRequest

type GoogleURLRequest struct {
	Test bool `protobuf:"varint,1,opt,name=test,proto3" json:"test,omitempty"`
	// contains filtered or unexported fields
}

func (*GoogleURLRequest) Descriptor deprecated

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

Deprecated: Use GoogleURLRequest.ProtoReflect.Descriptor instead.

func (*GoogleURLRequest) GetTest

func (x *GoogleURLRequest) GetTest() bool

func (*GoogleURLRequest) ProtoMessage

func (*GoogleURLRequest) ProtoMessage()

func (*GoogleURLRequest) ProtoReflect

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

func (*GoogleURLRequest) Reset

func (x *GoogleURLRequest) Reset()

func (*GoogleURLRequest) String

func (x *GoogleURLRequest) String() string

type GoogleURLResponse

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

func (*GoogleURLResponse) Descriptor deprecated

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

Deprecated: Use GoogleURLResponse.ProtoReflect.Descriptor instead.

func (*GoogleURLResponse) GetUrl

func (x *GoogleURLResponse) GetUrl() string

func (*GoogleURLResponse) ProtoMessage

func (*GoogleURLResponse) ProtoMessage()

func (*GoogleURLResponse) ProtoReflect

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

func (*GoogleURLResponse) Reset

func (x *GoogleURLResponse) Reset()

func (*GoogleURLResponse) String

func (x *GoogleURLResponse) String() string

type LoginResponse

type LoginResponse struct {
	AuthToken  *AuthToken `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"`
	CustomerID string     `protobuf:"bytes,2,opt,name=customerID,proto3" json:"customerID,omitempty"`
	Namespace  string     `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	IsSignup   bool       `protobuf:"varint,4,opt,name=isSignup,proto3" json:"isSignup,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetAuthToken

func (x *LoginResponse) GetAuthToken() *AuthToken

func (*LoginResponse) GetCustomerID

func (x *LoginResponse) GetCustomerID() string

func (*LoginResponse) GetIsSignup

func (x *LoginResponse) GetIsSignup() bool

func (*LoginResponse) GetNamespace

func (x *LoginResponse) GetNamespace() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type OauthService

type OauthService interface {
	GoogleURL(ctx context.Context, in *GoogleURLRequest, opts ...client.CallOption) (*GoogleURLResponse, error)
	GoogleLogin(ctx context.Context, in *GoogleLoginRequest, opts ...client.CallOption) (*LoginResponse, error)
	GithubURL(ctx context.Context, in *GithubURLRequest, opts ...client.CallOption) (*GithubURLResponse, error)
	GithubLogin(ctx context.Context, in *GithubLoginRequest, opts ...client.CallOption) (*LoginResponse, error)
}

func NewOauthService

func NewOauthService(name string, c client.Client) OauthService

Jump to

Keyboard shortcuts

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