go_micro_srv_auth_oauth2

package
v0.0.0-...-ffa2c18 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package go_micro_srv_auth_oauth2 is a generated protocol buffer package.

It is generated from these files:

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

It has these top-level messages:

Token
AuthorizeRequest
AuthorizeResponse
TokenRequest
TokenResponse
RevokeRequest
RevokeResponse
IntrospectRequest
IntrospectResponse

Package go_micro_srv_auth_oauth2 is a generated protocol buffer package.

It is generated from these files:

github.com/microhq/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, opts ...server.HandlerOption) error

Types

type AuthorizeRequest

type AuthorizeRequest struct {
	// code, token (not supported)
	ResponseType string   `protobuf:"bytes,1,opt,name=response_type,json=responseType" json:"response_type,omitempty"`
	ClientId     string   `protobuf:"bytes,2,opt,name=client_id,json=clientId" 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=redirectUri" json:"redirect_uri,omitempty"`
}

func (*AuthorizeRequest) Descriptor

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

func (*AuthorizeRequest) GetClientId

func (m *AuthorizeRequest) GetClientId() string

func (*AuthorizeRequest) GetRedirectUri

func (m *AuthorizeRequest) GetRedirectUri() string

func (*AuthorizeRequest) GetResponseType

func (m *AuthorizeRequest) GetResponseType() string

func (*AuthorizeRequest) GetScopes

func (m *AuthorizeRequest) GetScopes() []string

func (*AuthorizeRequest) GetState

func (m *AuthorizeRequest) GetState() string

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) GetCode

func (m *AuthorizeResponse) GetCode() string

func (*AuthorizeResponse) GetState

func (m *AuthorizeResponse) GetState() string

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=accessToken" json:"access_token,omitempty"`
}

func (*IntrospectRequest) Descriptor

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

func (*IntrospectRequest) GetAccessToken

func (m *IntrospectRequest) GetAccessToken() string

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) GetActive

func (m *IntrospectResponse) GetActive() bool

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 Oauth2Service

type Oauth2Service 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 NewOauth2Service

func NewOauth2Service(name string, c client.Client) Oauth2Service

type RevokeRequest

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

func (*RevokeRequest) Descriptor

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

func (*RevokeRequest) GetAccessToken

func (m *RevokeRequest) GetAccessToken() string

func (*RevokeRequest) GetRefreshToken

func (m *RevokeRequest) GetRefreshToken() string

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=accessToken" json:"access_token,omitempty"`
	TokenType    string   `protobuf:"bytes,2,opt,name=token_type,json=tokenType" json:"token_type,omitempty"`
	RefreshToken string   `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken" json:"refresh_token,omitempty"`
	ExpiresAt    int64    `protobuf:"varint,4,opt,name=expires_at,json=expiresAt" 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) GetAccessToken

func (m *Token) GetAccessToken() string

func (*Token) GetExpiresAt

func (m *Token) GetExpiresAt() int64

func (*Token) GetMetadata

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

func (*Token) GetRefreshToken

func (m *Token) GetRefreshToken() string

func (*Token) GetScopes

func (m *Token) GetScopes() []string

func (*Token) GetTokenType

func (m *Token) GetTokenType() 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=clientId" json:"client_id,omitempty"`
	ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret" 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=grantType" json:"grant_type,omitempty"`
	RedirectUri  string `protobuf:"bytes,5,opt,name=redirect_uri,json=redirectUri" json:"redirect_uri,omitempty"`
	RefreshToken string `protobuf:"bytes,6,opt,name=refresh_token,json=refreshToken" 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) GetClientId

func (m *TokenRequest) GetClientId() string

func (*TokenRequest) GetClientSecret

func (m *TokenRequest) GetClientSecret() string

func (*TokenRequest) GetCode

func (m *TokenRequest) GetCode() string

func (*TokenRequest) GetGrantType

func (m *TokenRequest) GetGrantType() string

func (*TokenRequest) GetMetadata

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

func (*TokenRequest) GetRedirectUri

func (m *TokenRequest) GetRedirectUri() string

func (*TokenRequest) GetRefreshToken

func (m *TokenRequest) GetRefreshToken() string

func (*TokenRequest) GetScopes

func (m *TokenRequest) GetScopes() []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