Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthContext ¶
type AuthContext struct { Username string // email or username Password string Callback string // callback for OIDC }
AuthContext contains all information that the AuthProvider needs to perform the authentication.
type AuthProvider ¶
type AuthProvider interface { GetName() string GetType() AuthProviderType GetPriority() int // lower number = higher priority Login(*AuthContext) (string, error) Logout(*AuthContext) error GetUserModel(*AuthContext) (*User, error) SetupRoutes(routes *gin.RouterGroup) }
AuthProvider is a interface that can be implemented by different authentication providers like LDAP, OAUTH, ...
type AuthProviderType ¶
type AuthProviderType string
const ( AuthProviderTypePassword AuthProviderType = "password" AuthProviderTypeOauth AuthProviderType = "oauth" )
Click to show internal directories.
Click to hide internal directories.