Documentation ¶
Index ¶
- Constants
- func AuthenticateToken(accessToken string) (*data.User, error)
- func CreateRefreshToken(user data.User) (string, error)
- func CreateToken(user data.User) (string, error)
- func CredMatcher(headerName string) (mdName string, ok bool)
- func NewAuthClient(authEndpoint string) (*grpc.ClientConn, authpb.AuthServiceClient)
- func NewSHA256(data string) string
- func NewUsersClient(usersEndpoint string) (*grpc.ClientConn, userspb.UsersServiceClient)
- func RefreshAccessToken(refreshToken string) (string, error)
- func UUID() (string, error)
- type BasicAuthentication
- type BearerAuthentication
- type UserMetaData
Constants ¶
View Source
const ( ClientIDKey contextKey = iota EndpointKey ConfigKey ServiceKey )
Variables ¶
This section is empty.
Functions ¶
func CredMatcher ¶
func NewAuthClient ¶
func NewAuthClient(authEndpoint string) (*grpc.ClientConn, authpb.AuthServiceClient)
func NewUsersClient ¶
func NewUsersClient(usersEndpoint string) (*grpc.ClientConn, userspb.UsersServiceClient)
func RefreshAccessToken ¶
Types ¶
type BasicAuthentication ¶
func (*BasicAuthentication) GetRequestMetadata ¶
func (*BasicAuthentication) RequireTransportSecurity ¶
func (a *BasicAuthentication) RequireTransportSecurity() bool
type BearerAuthentication ¶
type BearerAuthentication struct {
Token string
}
func (*BearerAuthentication) GetRequestMetadata ¶
func (*BearerAuthentication) RequireTransportSecurity ¶
func (a *BearerAuthentication) RequireTransportSecurity() bool
type UserMetaData ¶
Click to show internal directories.
Click to hide internal directories.