Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("no token found") ErrUnauthenticated = errors.New("unauthenticated") )
View Source
var ErrPortNotAvailable = fmt.Errorf("port %d is not available, unable to start local auth callback server", LOCAL_PKCE_CALLBACK_PORT)
ErrPortNotAvailable is returned when the local auth callback port is not available.
View Source
var LOCAL_PKCE_CALLBACK_PORT = 48321
The port that the local auth callback server will listen on. This is used to handle the callback from the WorkOS auth provider.
Functions ¶
This section is empty.
Types ¶
type CallbackResult ¶
type CodeVerifier ¶
type KeyringTokenStore ¶
type KeyringTokenStore struct {
// contains filtered or unexported fields
}
func NewKeyringTokenStore ¶
func NewKeyringTokenStore(serviceName, tokenKey string) (*KeyringTokenStore, error)
func (*KeyringTokenStore) Clear ¶
func (s *KeyringTokenStore) Clear() error
func (*KeyringTokenStore) GetTokens ¶
func (s *KeyringTokenStore) GetTokens() (*Tokens, error)
func (*KeyringTokenStore) SaveTokens ¶
func (s *KeyringTokenStore) SaveTokens(tokens *Tokens) error
type TokenStore ¶
type WorkOSAuth ¶
type WorkOSAuth struct {
// contains filtered or unexported fields
}
func NewWorkOSAuth ¶
func NewWorkOSAuth(inj do.Injector) (*WorkOSAuth, error)
func (*WorkOSAuth) GetAccessToken ¶
func (a *WorkOSAuth) GetAccessToken(forceRefresh bool) (string, error)
func (*WorkOSAuth) Logout ¶
func (a *WorkOSAuth) Logout() error
func (*WorkOSAuth) RefreshTokenForOrganization ¶
func (a *WorkOSAuth) RefreshTokenForOrganization(organizationId string) error
Click to show internal directories.
Click to hide internal directories.