Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultPublicKey is the default public key for token and refresh token DefaultPublicKey = prototoken.NewHMACPublicKey([]byte("DefaultSecret")) )
Functions ¶
func HasPermission ¶
HasPermission returns true if the user has a permission
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client performs auth requests against the service
func (*Client) Auth ¶
func (c *Client) Auth(ctx context.Context, username string, password string) (*proto.Response, error)
Auth performs an auth request against the service
type Option ¶
type Option func(*options)
Option is a options for client or service
func PublicKeyHMAC ¶
PublicKeyHMAC sets the public key for both tokens and refresh tokens
func PublicKeyRSA ¶
PublicKeyRSA sets the public key for both tokens and refresh tokens
Click to show internal directories.
Click to hide internal directories.