go_micro_srv_auth_oauth2

package
v0.0.0-...-41b679a Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package go_micro_srv_auth_oauth2 is a generated protocol buffer package.

It is generated from these files:

github.com/micro/auth-srv/proto/oauth2/oauth2.proto

It has these top-level messages:

Token
AuthorizeRequest
AuthorizeResponse
TokenRequest
TokenResponse
RevokeRequest
RevokeResponse
IntrospectRequest
IntrospectResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOauth2Handler

func RegisterOauth2Handler(s server.Server, hdlr Oauth2Handler)

Types

type AuthorizeRequest

type AuthorizeRequest struct {
	// code, token (not supported)
	ResponseType string   `protobuf:"bytes,1,opt,name=response_type" json:"response_type,omitempty"`
	ClientId     string   `protobuf:"bytes,2,opt,name=client_id" json:"client_id,omitempty"`
	Scopes       []string `protobuf:"bytes,3,rep,name=scopes" json:"scopes,omitempty"`
	State        string   `protobuf:"bytes,4,opt,name=state" json:"state,omitempty"`
	RedirectUri  string   `protobuf:"bytes,5,opt,name=redirect_uri" json:"redirect_uri,omitempty"`
}

func (*AuthorizeRequest) Descriptor

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

func (*AuthorizeRequest) ProtoMessage

func (*AuthorizeRequest) ProtoMessage()

func (*AuthorizeRequest) Reset

func (m *AuthorizeRequest) Reset()

func (*AuthorizeRequest) String

func (m *AuthorizeRequest) String() string

type AuthorizeResponse

type AuthorizeResponse struct {
	Code  string `protobuf:"bytes,1,opt,name=code" json:"code,omitempty"`
	State string `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"`
	// implicit response
	Token *Token `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"`
}

func (*AuthorizeResponse) Descriptor

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

func (*AuthorizeResponse) GetToken

func (m *AuthorizeResponse) GetToken() *Token

func (*AuthorizeResponse) ProtoMessage

func (*AuthorizeResponse) ProtoMessage()

func (*AuthorizeResponse) Reset

func (m *AuthorizeResponse) Reset()

func (*AuthorizeResponse) String

func (m *AuthorizeResponse) String() string

type IntrospectRequest

type IntrospectRequest struct {
	AccessToken string `protobuf:"bytes,1,opt,name=access_token" json:"access_token,omitempty"`
}

func (*IntrospectRequest) Descriptor

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

func (*IntrospectRequest) ProtoMessage

func (*IntrospectRequest) ProtoMessage()

func (*IntrospectRequest) Reset

func (m *IntrospectRequest) Reset()

func (*IntrospectRequest) String

func (m *IntrospectRequest) String() string

type IntrospectResponse

type IntrospectResponse struct {
	Token  *Token `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
	Active bool   `protobuf:"varint,2,opt,name=active" json:"active,omitempty"`
}

func (*IntrospectResponse) Descriptor

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

func (*IntrospectResponse) GetToken

func (m *IntrospectResponse) GetToken() *Token

func (*IntrospectResponse) ProtoMessage

func (*IntrospectResponse) ProtoMessage()

func (*IntrospectResponse) Reset

func (m *IntrospectResponse) Reset()

func (*IntrospectResponse) String

func (m *IntrospectResponse) String() string

type Oauth2

type Oauth2 struct {
	Oauth2Handler
}

func (*Oauth2) Authorize

func (h *Oauth2) Authorize(ctx context.Context, in *AuthorizeRequest, out *AuthorizeResponse) error

func (*Oauth2) Introspect

func (h *Oauth2) Introspect(ctx context.Context, in *IntrospectRequest, out *IntrospectResponse) error

func (*Oauth2) Revoke

func (h *Oauth2) Revoke(ctx context.Context, in *RevokeRequest, out *RevokeResponse) error

func (*Oauth2) Token

func (h *Oauth2) Token(ctx context.Context, in *TokenRequest, out *TokenResponse) error

type Oauth2Client

type Oauth2Client interface {
	Authorize(ctx context.Context, in *AuthorizeRequest, opts ...client.CallOption) (*AuthorizeResponse, error)
	Token(ctx context.Context, in *TokenRequest, opts ...client.CallOption) (*TokenResponse, error)
	Revoke(ctx context.Context, in *RevokeRequest, opts ...client.CallOption) (*RevokeResponse, error)
	Introspect(ctx context.Context, in *IntrospectRequest, opts ...client.CallOption) (*IntrospectResponse, error)
}

func NewOauth2Client

func NewOauth2Client(serviceName string, c client.Client) Oauth2Client

type RevokeRequest

type RevokeRequest struct {
	// revoke access token
	AccessToken string `protobuf:"bytes,1,opt,name=access_token" json:"access_token,omitempty"`
	// revoke via refresh token
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token" json:"refresh_token,omitempty"`
}

func (*RevokeRequest) Descriptor

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

func (*RevokeRequest) ProtoMessage

func (*RevokeRequest) ProtoMessage()

func (*RevokeRequest) Reset

func (m *RevokeRequest) Reset()

func (*RevokeRequest) String

func (m *RevokeRequest) String() string

type RevokeResponse

type RevokeResponse struct {
}

func (*RevokeResponse) Descriptor

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

func (*RevokeResponse) ProtoMessage

func (*RevokeResponse) ProtoMessage()

func (*RevokeResponse) Reset

func (m *RevokeResponse) Reset()

func (*RevokeResponse) String

func (m *RevokeResponse) String() string

type Token

type Token struct {
	AccessToken  string   `protobuf:"bytes,1,opt,name=access_token" json:"access_token,omitempty"`
	TokenType    string   `protobuf:"bytes,2,opt,name=token_type" json:"token_type,omitempty"`
	RefreshToken string   `protobuf:"bytes,3,opt,name=refresh_token" json:"refresh_token,omitempty"`
	ExpiresAt    int64    `protobuf:"varint,4,opt,name=expires_at" json:"expires_at,omitempty"`
	Scopes       []string `protobuf:"bytes,5,rep,name=scopes" json:"scopes,omitempty"`
	// metadata associated with the token
	Metadata map[string]string `` /* 136-byte string literal not displayed */
}

func (*Token) Descriptor

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

func (*Token) GetMetadata

func (m *Token) GetMetadata() map[string]string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) String

func (m *Token) String() string

type TokenRequest

type TokenRequest struct {
	ClientId     string `protobuf:"bytes,1,opt,name=client_id" json:"client_id,omitempty"`
	ClientSecret string `protobuf:"bytes,2,opt,name=client_secret" json:"client_secret,omitempty"`
	Code         string `protobuf:"bytes,3,opt,name=code" json:"code,omitempty"`
	// password (not supported), client_credentials, authorization_code, refresh_token
	GrantType    string `protobuf:"bytes,4,opt,name=grant_type" json:"grant_type,omitempty"`
	RedirectUri  string `protobuf:"bytes,5,opt,name=redirect_uri" json:"redirect_uri,omitempty"`
	RefreshToken string `protobuf:"bytes,6,opt,name=refresh_token" json:"refresh_token,omitempty"`
	// scopes can be added for client_credentials request
	Scopes []string `protobuf:"bytes,7,rep,name=scopes" json:"scopes,omitempty"`
	// metadata to be stored with a token that's generated
	Metadata map[string]string `` /* 136-byte string literal not displayed */
}

func (*TokenRequest) Descriptor

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

func (*TokenRequest) GetMetadata

func (m *TokenRequest) GetMetadata() map[string]string

func (*TokenRequest) ProtoMessage

func (*TokenRequest) ProtoMessage()

func (*TokenRequest) Reset

func (m *TokenRequest) Reset()

func (*TokenRequest) String

func (m *TokenRequest) String() string

type TokenResponse

type TokenResponse struct {
	Token *Token `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}

func (*TokenResponse) Descriptor

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

func (*TokenResponse) GetToken

func (m *TokenResponse) GetToken() *Token

func (*TokenResponse) ProtoMessage

func (*TokenResponse) ProtoMessage()

func (*TokenResponse) Reset

func (m *TokenResponse) Reset()

func (*TokenResponse) String

func (m *TokenResponse) String() string

Jump to

Keyboard shortcuts

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