Versions in this module Expand all Collapse all v0 v0.1.0 Feb 3, 2018 Changes in this version + func Sync(dataStore *gorm.DB) *gorm.DB + type BaseStore interface + GetUserByExtID func(string) (interface{}, error) + type OauthAccessToken struct + ClientID uint + Signature string + UserID uint + func (oa *OauthAccessToken) GetSession() interface{} + func (oa *OauthAccessToken) GetSignature() string + func (oa *OauthAccessToken) SetSession(session interface{}) + type OauthAuthorizeCode struct + Challenge string + ChallengeMethod string + ClientID uint + Code string + UserID uint + func (oa *OauthAuthorizeCode) GetCode() string + func (oa *OauthAuthorizeCode) GetSession() interface{} + func (oa *OauthAuthorizeCode) SetSession(session interface{}) + type OauthClient struct + ClientID string + CreatedAt time.Time + GrantTypes string + ID uint + LastUsed time.Time + Name string + Public bool + RedirectURIs string + ResponseTypes string + Scopes string + Secret string + UpdatedAt time.Time + UserData string + UserID uint + func (c *OauthClient) GetCreatedAt() time.Time + func (c *OauthClient) GetGrantTypes() []string + func (c *OauthClient) GetID() string + func (c *OauthClient) GetLastUsed() time.Time + func (c *OauthClient) GetName() string + func (c *OauthClient) GetRedirectURIs() []string + func (c *OauthClient) GetResponseTypes() []string + func (c *OauthClient) GetScopes() []string + func (c *OauthClient) GetSecret() string + func (c *OauthClient) GetUserData() interface{} + func (c *OauthClient) IsPublic() bool + func (c *OauthClient) SetGrantTypes(grantTypes []string) + func (c *OauthClient) SetID(id string) + func (c *OauthClient) SetLastUsed(t time.Time) + func (c *OauthClient) SetRedirectURIs(redirectURIs []string) + func (c *OauthClient) SetResponseTypes(responseTypes []string) + func (c *OauthClient) SetScopes(scopes []string) + func (c *OauthClient) SetSecret(secret string) + func (c *OauthClient) SetUserData(userData string) + type OauthRefreshToken struct + ClientID uint + Signature string + UserID uint + func (or *OauthRefreshToken) GetSession() interface{} + func (or *OauthRefreshToken) GetSignature() string + func (or *OauthRefreshToken) SetSession(session interface{}) + type OauthRequest struct + Client OauthClient + ExpiresAt time.Time + Form string + GrantedScopes string + RequestID string + RequestedAt time.Time + RequestedScopes string + Session OauthSession + func (c *OauthRequest) AppendRequestedScope(scope string) + func (c *OauthRequest) GetGrantedScopes() []string + func (c *OauthRequest) GetRequestedScopes() []string + func (c *OauthRequest) GrantScope(scope string) + func (c *OauthRequest) Merge(a interface{}) + func (c *OauthRequest) SetGrantedScopes(scopes []string) + func (c *OauthRequest) SetRequestedScopes(scopes []string) + func (or *OauthRequest) GetClient() interface{} + func (or *OauthRequest) GetExpiresAt() time.Time + func (or *OauthRequest) GetRequestID() string + func (or *OauthRequest) GetRequestedAt() time.Time + func (or *OauthRequest) GetSession() interface{} + func (or *OauthRequest) SetRequestID(id string) + type OauthSession struct + AccessExpiry time.Time + AuthorizeExpiry time.Time + IDExpiry time.Time + RefreshExpiry time.Time + Subject string + UserExtID string + Username string + func NewSession(userID, username string) OauthSession + func (s *OauthSession) Clone() interface{} + func (s *OauthSession) GetAccessExpiry() time.Time + func (s *OauthSession) GetAuthorizeExpiry() time.Time + func (s *OauthSession) GetIDExpiry() time.Time + func (s *OauthSession) GetRefreshExpiry() time.Time + func (s *OauthSession) GetSession() interface{} + func (s *OauthSession) GetSubject() string + func (s *OauthSession) GetUserID() string + func (s *OauthSession) GetUsername() string + func (s *OauthSession) SetAccessExpiry(t time.Time) + func (s *OauthSession) SetAuthorizeExpiry(t time.Time) + func (s *OauthSession) SetIDExpiry(t time.Time) + func (s *OauthSession) SetRefreshExpiry(t time.Time) + type OauthStore struct + func NewOauthStore(db *gorm.DB, baseStore BaseStore) *OauthStore + func (oauthStore *OauthStore) AddAuthorizeCodeSession(userID, clientID, code, requestID string, requestedAt, expiresAt time.Time, ...) (interface{}, error) + func (oauthStore *OauthStore) AddClient(userID, clientID, clientName, secret string, ...) (interface{}, error) + func (oauthStore *OauthStore) GetAuthorizeCodeSession(code string) (interface{}, error) + func (oauthStore *OauthStore) GetAuthorizeCodeSessionByRequestID(requestID string) (interface{}, error) + func (oauthStore *OauthStore) GetClientByID(clientID string) (interface{}, error) + func (oauthStore *OauthStore) GetClientsByUserID(userID string) ([]interface{}, error) + func (oauthStore *OauthStore) RemoveAuthorizeCodeSession(code string) error + func (oauthStore *OauthStore) RemoveClientByID(clientID string) error + func (oauthStore *OauthStore) UpdateClient(client interface{}) (interface{}, error) + func (os *OauthStore) AddAccessTokenSession(userID, clientID, signature, requestID string, ...) (interface{}, error) + func (os *OauthStore) AddRefreshTokenSession(userID, clientID, signature, requestID string, ...) (interface{}, error) + func (os *OauthStore) GetAccessTokenSession(signature string) (interface{}, error) + func (os *OauthStore) GetAccessTokenSessionByRequestID(requestID string) (interface{}, error) + func (os *OauthStore) GetAccessTokenSessionsByUserID(userID string) ([]interface{}, error) + func (os *OauthStore) GetAuthorizeCodeSessionsByUserID(userID string) ([]interface{}, error) + func (os *OauthStore) GetClientByAccessTokenSession(signature string) (interface{}, error) + func (os *OauthStore) GetClientByRefreshToken(signature string) (interface{}, error) + func (os *OauthStore) GetRefreshTokenBySignature(signature string) (interface{}, error) + func (os *OauthStore) GetRefreshTokenSessionByRequestID(requestID string) (interface{}, error) + func (os *OauthStore) GetRefreshTokenSessionsByUserID(userID string) ([]interface{}, error) + func (os *OauthStore) RemoveAccessTokenSession(signature string) error + func (os *OauthStore) RemoveRefreshToken(signature string) error + func (os *OauthStore) Sync(force bool) *gorm.DB + type User interface + GetExtID func() string + GetIntID func() uint + GetUsername func() string