Documentation ¶
Index ¶
- Constants
- Variables
- func CheckMailUnseen(uid string) int
- func Cleanup() error
- func GetEmailAddress(uid string) string
- func GetMailEntryUrl(uid string) string
- func GetStaffFromExmail(email string) (*models.Staff, error)
- func LoadArticle(id int) (*models.Article, error)
- func LoadArticles(limit, offset int) (data []*models.Article, err error)
- func LoadLink(id int) (*models.Link, error)
- func LoadLinks(limit, offset int) (data []*models.Link, err error)
- func SaveArticle(a *models.Article) error
- func SaveLink(l *models.Link) error
- func WriteUserLog(uid, subject, message string) error
- type DbStorage
- func (s *DbStorage) Clone() osin.Storage
- func (s *DbStorage) Close()
- func (s *DbStorage) CountClients() (total uint)
- func (s *DbStorage) GetClient(id string) (osin.Client, error)
- func (s *DbStorage) GetClientWithCode(code string) (*models.Client, error)
- func (s *DbStorage) IsAuthorized(client_id, username string) bool
- func (s *DbStorage) LoadAccess(code string) (*osin.AccessData, error)
- func (s *DbStorage) LoadAuthorize(code string) (*osin.AuthorizeData, error)
- func (s *DbStorage) LoadClients(limit, offset int, sort map[string]int) (clients []*models.Client, err error)
- func (s *DbStorage) LoadRefresh(code string) (*osin.AccessData, error)
- func (s *DbStorage) LoadScopes() (scopes []*models.Scope, err error)
- func (s *DbStorage) RemoveAccess(code string) error
- func (s *DbStorage) RemoveAuthorize(code string) error
- func (s *DbStorage) RemoveRefresh(code string) error
- func (s *DbStorage) SaveAccess(data *osin.AccessData) error
- func (s *DbStorage) SaveAuthorize(data *osin.AuthorizeData) error
- func (s *DbStorage) SaveAuthorized(client_id, username string) error
- func (s *DbStorage) SaveClient(client *models.Client) error
- type OSINStore
- type Servicer
Constants ¶
View Source
const ( AuthorizationExpiration = 900 AccessExpiration = 86400 )
View Source
const ( ASCENDING = 1 DESCENDING = -1 )
Variables ¶
View Source
var (
ErrInvalidResetToken = errors.New("invalid reset token or not found")
)
View Source
var (
ErrNotFound = errors.New("Not Found")
)
Functions ¶
func CheckMailUnseen ¶
func GetEmailAddress ¶
func GetMailEntryUrl ¶
func SaveArticle ¶
func WriteUserLog ¶
Types ¶
type DbStorage ¶
type DbStorage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage() *DbStorage
func (*DbStorage) CountClients ¶ added in v0.6.3
func (*DbStorage) GetClientWithCode ¶ added in v0.6.3
func (*DbStorage) IsAuthorized ¶ added in v0.6.3
func (*DbStorage) LoadAccess ¶
func (s *DbStorage) LoadAccess(code string) (*osin.AccessData, error)
func (*DbStorage) LoadAuthorize ¶
func (s *DbStorage) LoadAuthorize(code string) (*osin.AuthorizeData, error)
func (*DbStorage) LoadClients ¶ added in v0.6.3
func (*DbStorage) LoadRefresh ¶
func (s *DbStorage) LoadRefresh(code string) (*osin.AccessData, error)
func (*DbStorage) LoadScopes ¶ added in v0.6.3
func (*DbStorage) RemoveAccess ¶
func (*DbStorage) RemoveAuthorize ¶
func (*DbStorage) RemoveRefresh ¶
func (*DbStorage) SaveAccess ¶
func (s *DbStorage) SaveAccess(data *osin.AccessData) error
func (*DbStorage) SaveAuthorize ¶
func (s *DbStorage) SaveAuthorize(data *osin.AuthorizeData) error
func (*DbStorage) SaveAuthorized ¶ added in v0.6.3
type OSINStore ¶ added in v0.6.3
type OSINStore interface { osin.Storage LoadClients(limit, offset int, sort map[string]int) ([]*models.Client, error) CountClients() uint GetClientWithCode(code string) (*models.Client, error) SaveClient(client *models.Client) error LoadScopes() (scopes []*models.Scope, err error) IsAuthorized(client_id, username string) bool SaveAuthorized(client_id, username string) error }
type Servicer ¶ added in v0.6.3
type Servicer interface { models.Authenticator models.StaffStore models.PasswordStore models.GroupStore cas.TicketStore OSIN() OSINStore CloseAll() StoreStaff(*models.Staff) error InGroup(gn, uid string) bool ProfileModify(uid, password string, staff *models.Staff) error PasswordForgot(at common.AliasType, target, uid string) error PasswordResetTokenVerify(token string) (uid string, err error) PasswordResetWithToken(login, token, passwd string) (err error) }
func NewService ¶
func NewService() Servicer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.