Documentation ¶
Index ¶
- func NewNonTransactionManager(rf service.RepositoryFactory) (service.TransactionManager, error)
- func NewTransactionManager(db *gorm.DB, rff RepositoryFactoryFunc) (service.TransactionManager, error)
- type AppUserClaims
- type AuthTokenManager
- func (m *AuthTokenManager) CreateTokenSet(ctx context.Context, appUser service.AppUserInterface, ...) (*domain.AuthTokenSet, error)
- func (m *AuthTokenManager) GetUserInfo(ctx context.Context, tokenString string) (*service.AppUserInfo, error)
- func (m *AuthTokenManager) RefreshToken(ctx context.Context, tokenString string) (string, error)
- type GoogleAuthClient
- type HTTPClient
- type RepositoryFactory
- type RepositoryFactoryFunc
- type StateRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNonTransactionManager ¶
func NewNonTransactionManager(rf service.RepositoryFactory) (service.TransactionManager, error)
func NewTransactionManager ¶
func NewTransactionManager(db *gorm.DB, rff RepositoryFactoryFunc) (service.TransactionManager, error)
Types ¶
type AppUserClaims ¶
type AppUserClaims struct { LoginID string `json:"loginId"` AppUserID int `json:"appUserId"` Username string `json:"username"` OrganizationID int `json:"organizationId"` OrganizationName string `json:"organizationName"` // Role string `json:"role"` TokenType string `json:"tokenType"` jwt.StandardClaims }
type AuthTokenManager ¶
type AuthTokenManager struct { SigningKey []byte SigningMethod jwt.SigningMethod TokenTimeout time.Duration RefreshTimeout time.Duration }
func NewAuthTokenManager ¶
func NewAuthTokenManager(signingKey []byte, signingMethod jwt.SigningMethod, tokenTimeout, refreshTimeout time.Duration) *AuthTokenManager
func (*AuthTokenManager) CreateTokenSet ¶
func (m *AuthTokenManager) CreateTokenSet(ctx context.Context, appUser service.AppUserInterface, organization service.OrganizationInterface) (*domain.AuthTokenSet, error)
func (*AuthTokenManager) GetUserInfo ¶
func (m *AuthTokenManager) GetUserInfo(ctx context.Context, tokenString string) (*service.AppUserInfo, error)
func (*AuthTokenManager) RefreshToken ¶
type GoogleAuthClient ¶
type GoogleAuthClient struct { HTTPClient HTTPClient ClientID string ClientSecret string RedirectURI string GrantType string }
func NewGoogleAuthClient ¶
func NewGoogleAuthClient(httpClient HTTPClient, clientID, clientSecret, redirectURI string) *GoogleAuthClient
func (*GoogleAuthClient) RetrieveAccessToken ¶
func (c *GoogleAuthClient) RetrieveAccessToken(ctx context.Context, code string) (*domain.AuthTokenSet, error)
func (*GoogleAuthClient) RetrieveUserInfo ¶
func (c *GoogleAuthClient) RetrieveUserInfo(ctx context.Context, googleAuthResponse *domain.AuthTokenSet) (*domain.UserInfo, error)
type RepositoryFactory ¶
type RepositoryFactory struct {
// contains filtered or unexported fields
}
func NewRepositoryFactory ¶
func NewRepositoryFactory(ctx context.Context, dialect rslibgateway.DialectRDBMS, driverName string, db *gorm.DB, location *time.Location) (*RepositoryFactory, error)
func (*RepositoryFactory) NewRedstartRepositoryFactory ¶
func (f *RepositoryFactory) NewRedstartRepositoryFactory(ctx context.Context) (rsuserservice.RepositoryFactory, error)
func (*RepositoryFactory) NewStateRepository ¶
func (f *RepositoryFactory) NewStateRepository(ctx context.Context) (service.StateRepository, error)
type RepositoryFactoryFunc ¶
type StateRepository ¶
type StateRepository struct { }
func NewStateRepository ¶
func NewStateRepository(ctx context.Context) (*StateRepository, error)
func (*StateRepository) DoesStateExists ¶
func (*StateRepository) GenerateState ¶
func (r *StateRepository) GenerateState(ctx context.Context) (string, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.