oauth

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package oauth is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/api/rpc/oauth/oauth.proto

It has these top-level messages:

AuthRequest
AuthReply
Token

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuthorization

func CheckAuthorization(ctx context.Context, store storage.Interface) (name string, err error)

CheckAuthorization verifies that the user is logged in and has organization access

func RegisterGithubServer

func RegisterGithubServer(s *grpc.Server, srv GithubServer)

Types

type AuthReply

type AuthReply struct {
	SessionKey string `protobuf:"bytes,1,opt,name=sessionKey" json:"sessionKey,omitempty"`
	Name       string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
}

func (*AuthReply) Descriptor

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

func (*AuthReply) GetName added in v0.4.0

func (m *AuthReply) GetName() string

func (*AuthReply) GetSessionKey added in v0.4.0

func (m *AuthReply) GetSessionKey() string

func (*AuthReply) ProtoMessage

func (*AuthReply) ProtoMessage()

func (*AuthReply) Reset

func (m *AuthReply) Reset()

func (*AuthReply) String

func (m *AuthReply) String() string

type AuthRequest

type AuthRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
	Otp      string `protobuf:"bytes,3,opt,name=otp" json:"otp,omitempty"`
}

func (*AuthRequest) Descriptor

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

func (*AuthRequest) GetOtp added in v0.4.0

func (m *AuthRequest) GetOtp() string

func (*AuthRequest) GetPassword added in v0.4.0

func (m *AuthRequest) GetPassword() string

func (*AuthRequest) GetUsername added in v0.4.0

func (m *AuthRequest) GetUsername() string

func (*AuthRequest) ProtoMessage

func (*AuthRequest) ProtoMessage()

func (*AuthRequest) Reset

func (m *AuthRequest) Reset()

func (*AuthRequest) String

func (m *AuthRequest) String() string

type GithubClient

type GithubClient interface {
	Create(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error)
}

func NewGithubClient

func NewGithubClient(cc *grpc.ClientConn) GithubClient

type GithubServer

type GithubServer interface {
	Create(context.Context, *AuthRequest) (*AuthReply, error)
}

type Oauth

type Oauth struct {
	Store        storage.Interface
	ClientID     string
	ClientSecret string
}

Oauth handles third party authentication

func (*Oauth) Create

func (o *Oauth) Create(ctx context.Context, in *AuthRequest) (out *AuthReply, err error)

Create creates new oauth credencials and stores them

type Token

type Token struct {
	Id             int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Token          string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
	TokenLastEight string `protobuf:"bytes,3,opt,name=tokenLastEight" json:"tokenLastEight,omitempty"`
}

func (*Token) Descriptor

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

func (*Token) GetId added in v0.4.0

func (m *Token) GetId() int32

func (*Token) GetToken added in v0.4.0

func (m *Token) GetToken() string

func (*Token) GetTokenLastEight added in v0.4.0

func (m *Token) GetTokenLastEight() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) String

func (m *Token) String() string

Jump to

Keyboard shortcuts

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