Documentation ¶
Index ¶
- func SetService(svc Service)
- func Signup(ctx context.ServiceContext, client *clients.GQLClient, options *SignupOptions) error
- func UpdatePassword(ctx context.ServiceContext, client *clients.HTTPClient, ...) error
- type DecryptKeysFromSessionOptions
- type DefaultService
- func (*DefaultService) DecryptKeysFromSession(ctx context.ServiceContext, client *clients.GQLClient, ...) (*keyCommons.Payload, error)
- func (*DefaultService) GenerateTOTPQR(ctx context.ServiceContext, client *clients.NhostClient) (*GenerateQRResponse, error)
- func (*DefaultService) RefreshToken(ctx context.ServiceContext, client *clients.NhostClient, ...) (*RefreshTokenResponse, error)
- func (*DefaultService) SigninWithMFA(ctx context.ServiceContext, client *clients.NhostClient, ...) (*SigninResponse, error)
- func (*DefaultService) SigninWithPAT(ctx context.ServiceContext, client *clients.NhostClient, ...) (*SigninResponse, error)
- func (*DefaultService) SigninWithPassword(ctx context.ServiceContext, client *clients.NhostClient, ...) (*SigninResponse, error)
- func (*DefaultService) ToggleMFA(ctx context.ServiceContext, client *clients.NhostClient, ...) error
- type GenerateQRResponse
- type MFAType
- type NhostSession
- type NhostSigninResponse
- type RefreshTokenOptions
- type RefreshTokenResponse
- type Service
- type SigninResponse
- type SigninWithMFAOptions
- type SigninWithPATOptions
- type SigninWithPasswordOptions
- type SignupOptions
- type ToggleMFAOptions
- type UpdatePasswordOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetService ¶
func SetService(svc Service)
func Signup ¶
func Signup(ctx context.ServiceContext, client *clients.GQLClient, options *SignupOptions) error
func UpdatePassword ¶
func UpdatePassword(ctx context.ServiceContext, client *clients.HTTPClient, options *UpdatePasswordOptions) error
Types ¶
type DecryptKeysFromSessionOptions ¶ added in v1.1.7
type DefaultService ¶
type DefaultService struct{}
func (*DefaultService) DecryptKeysFromSession ¶
func (*DefaultService) DecryptKeysFromSession(ctx context.ServiceContext, client *clients.GQLClient, options *DecryptKeysFromSessionOptions) (*keyCommons.Payload, error)
func (*DefaultService) GenerateTOTPQR ¶
func (*DefaultService) GenerateTOTPQR(ctx context.ServiceContext, client *clients.NhostClient) (*GenerateQRResponse, error)
func (*DefaultService) RefreshToken ¶ added in v1.1.13
func (*DefaultService) RefreshToken(ctx context.ServiceContext, client *clients.NhostClient, options *RefreshTokenOptions) (*RefreshTokenResponse, error)
func (*DefaultService) SigninWithMFA ¶
func (*DefaultService) SigninWithMFA(ctx context.ServiceContext, client *clients.NhostClient, options *SigninWithMFAOptions) (*SigninResponse, error)
func (*DefaultService) SigninWithPAT ¶ added in v1.1.8
func (*DefaultService) SigninWithPAT(ctx context.ServiceContext, client *clients.NhostClient, options *SigninWithPATOptions) (*SigninResponse, error)
func (*DefaultService) SigninWithPassword ¶
func (*DefaultService) SigninWithPassword(ctx context.ServiceContext, client *clients.NhostClient, options *SigninWithPasswordOptions) (*SigninResponse, error)
func (*DefaultService) ToggleMFA ¶
func (*DefaultService) ToggleMFA(ctx context.ServiceContext, client *clients.NhostClient, options *ToggleMFAOptions) error
Remember: Passing a nil value to the "ActiveMFAType" option will deactivate MFA.
type GenerateQRResponse ¶ added in v1.1.7
type NhostSession ¶ added in v1.1.7
type NhostSigninResponse ¶ added in v1.1.7
type RefreshTokenOptions ¶ added in v1.1.13
type RefreshTokenOptions struct {
RefreshToken string `json:"refreshToken"`
}
type RefreshTokenResponse ¶ added in v1.1.13
type Service ¶
type Service interface { ToggleMFA(context.ServiceContext, *clients.NhostClient, *ToggleMFAOptions) error GenerateTOTPQR(context.ServiceContext, *clients.NhostClient) (*GenerateQRResponse, error) SigninWithMFA(context.ServiceContext, *clients.NhostClient, *SigninWithMFAOptions) (*SigninResponse, error) SigninWithPassword(context.ServiceContext, *clients.NhostClient, *SigninWithPasswordOptions) (*SigninResponse, error) SigninWithPAT(context.ServiceContext, *clients.NhostClient, *SigninWithPATOptions) (*SigninResponse, error) RefreshToken(context.ServiceContext, *clients.NhostClient, *RefreshTokenOptions) (*RefreshTokenResponse, error) DecryptKeysFromSession(context.ServiceContext, *clients.GQLClient, *DecryptKeysFromSessionOptions) (*keyCommons.Payload, error) }
func GetService ¶
func GetService() Service
type SigninResponse ¶ added in v1.1.7
type SigninWithMFAOptions ¶ added in v1.1.7
func (*SigninWithMFAOptions) JSONMarshal ¶ added in v1.1.7
func (o *SigninWithMFAOptions) JSONMarshal() ([]byte, error)
Custom marshaller for the SigninWithMFAOptions.
type SigninWithPATOptions ¶ added in v1.1.8
type SigninWithPATOptions struct {
PAT string `json:"personalAccessToken"`
}
type SigninWithPasswordOptions ¶ added in v1.1.7
type SignupOptions ¶ added in v1.1.7
type ToggleMFAOptions ¶ added in v1.1.7
type ToggleMFAOptions struct { Code string `json:"code"` // The value of "null" will deactivate MFA. ActiveMFAType MFAType `json:"activeMfaType"` }
func (*ToggleMFAOptions) JSONMarshal ¶ added in v1.1.7
func (o *ToggleMFAOptions) JSONMarshal() ([]byte, error)
Custom marshaller for the ToggleMFAOptions.
type UpdatePasswordOptions ¶ added in v1.1.7
Click to show internal directories.
Click to hide internal directories.