Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAccess = errors.New("access denied")
ErrNoAccess means user doesn't have necessary permissions for a resource
Functions ¶
Types ¶
type ACL ¶
type ACL struct {
// contains filtered or unexported fields
}
ACL allows to manage permissions for user role
type GithubUser ¶ added in v0.0.1
type GithubUser struct { ID int `json:"id"` Login string `json:"login"` Username string `json:"name"` AvatarURL string `json:"avatar_url"` Role model.Role `json:"-"` }
GithubUser represents the user response returned by the GitHub auth.
type JWT ¶
type JWT struct {
// contains filtered or unexported fields
}
JWT service abstracts JWT implementation
type JWTConfig ¶
type JWTConfig struct {
SigningKey string `envconfig:"SIGNING_KEY" required:"true"`
}
JWTConfig defines enviroment variables for JWT
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
OAuth service abstracts OAuth implementation
func (*OAuth) MakeAuthURL ¶
MakeAuthURL returns string for redirect to provider
type OAuthConfig ¶
type OAuthConfig struct { ClientID string `envconfig:"CLIENT_ID" required:"true"` ClientSecret string `envconfig:"CLIENT_SECRET" required:"true"` RestrictAccess string `envconfig:"RESTRICT_ACCESS"` RestrictRequesterAccess string `envconfig:"RESTRICT_REQUESTER_ACCESS"` }
OAuthConfig defines enviroment variables for OAuth
Click to show internal directories.
Click to hide internal directories.