Documentation
¶
Index ¶
- type Account
- type CreateAccountRequest
- type CreateAccountResponse
- type CreateTenantRequest
- type DecodedToken
- type FirebaseInfo
- type GoogleIAM
- func (c *GoogleIAM) AccountExists(ctx context.Context, email string, tenantID ...string) (bool, error)
- func (c *GoogleIAM) CreateAccount(ctx context.Context, account CreateAccountRequest) (*CreateAccountResponse, error)
- func (c *GoogleIAM) CreateTenant(ctx context.Context, request CreateTenantRequest) (*TenantInfo, error)
- func (c *GoogleIAM) DeleteAccount(ctx context.Context, accountUID string, tenantID ...string) error
- func (c *GoogleIAM) DeleteTenant(ctx context.Context, tenantID string) error
- func (c *GoogleIAM) GetAccount(ctx context.Context, accountUID string, tenantID ...string) (*Account, error)
- func (c *GoogleIAM) Initiate(ctx context.Context, email string, tenantID ...string) error
- func (c *GoogleIAM) RefreshToken(ctx context.Context, refreshToken string) (*RefreshTokenResponse, error)
- func (c *GoogleIAM) ResetPasswordLink(ctx context.Context, email string, tenantID ...string) (*string, error)
- func (c *GoogleIAM) SetCustomUserClaims(ctx context.Context, accountUID string, claims map[string]interface{}, ...) error
- func (c *GoogleIAM) SignIn(ctx context.Context, email, password string, tenantID ...string) (*SignInResponse, error)
- func (c *GoogleIAM) SignOut(ctx context.Context, accountUUID string, tenantID ...string) error
- func (c *GoogleIAM) UpdateAccount(ctx context.Context, accountUID string, account UpdateAccountRequest, ...) (*UpdateAccountResponse, error)
- func (c *GoogleIAM) UpdateAccountPassword(ctx context.Context, accountUID string, request UpdatePasswordRequest) (*SignInResponse, error)
- func (c *GoogleIAM) VerifyToken(ctx context.Context, token string, tenantID ...string) (*DecodedToken, error)
- type RefreshTokenRequest
- type RefreshTokenResponse
- type SignInRequest
- type SignInResponse
- type SignOutRequest
- type TenantInfo
- type UpdateAccountRequest
- type UpdateAccountResponse
- type UpdatePasswordRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
UUID string `json:"uuid,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Email string `json:"email,omitempty"`
Phone *string `json:"phone,omitempty"`
PhotoURL *string `json:"photo_url,omitempty"`
EmailVerified *bool `json:"email_verified,omitempty"`
Disabled *bool `json:"disabled,omitempty"`
CustomClaims map[string]interface{} `json:"custom_claims,omitempty"`
}
type CreateAccountRequest ¶
type CreateAccountResponse ¶
type CreateAccountResponse struct {
Account Account `json:"account"`
SignInResponse SignInResponse `json:"sign_in_response"`
}
type CreateTenantRequest ¶ added in v1.2.0
type DecodedToken ¶ added in v1.3.1
type DecodedToken struct {
AuthTime int64 `json:"auth_time"`
Issuer string `json:"iss"`
Audience string `json:"aud"`
Expires int64 `json:"exp"`
IssuedAt int64 `json:"iat"`
Subject string `json:"sub,omitempty"`
UUID string `json:"uuid,omitempty"`
Claims map[string]interface{} `json:"-"`
Firebase FirebaseInfo `json:"firebase"`
}
type FirebaseInfo ¶ added in v1.3.2
type GoogleIAM ¶
type GoogleIAM struct {
// contains filtered or unexported fields
}
func (*GoogleIAM) AccountExists ¶
func (*GoogleIAM) CreateAccount ¶
func (c *GoogleIAM) CreateAccount(ctx context.Context, account CreateAccountRequest) (*CreateAccountResponse, error)
func (*GoogleIAM) CreateTenant ¶ added in v1.2.0
func (c *GoogleIAM) CreateTenant(ctx context.Context, request CreateTenantRequest) (*TenantInfo, error)
func (*GoogleIAM) DeleteAccount ¶
func (*GoogleIAM) DeleteTenant ¶ added in v1.2.0
func (*GoogleIAM) GetAccount ¶ added in v1.1.1
func (*GoogleIAM) RefreshToken ¶ added in v1.3.0
func (c *GoogleIAM) RefreshToken(ctx context.Context, refreshToken string) (*RefreshTokenResponse, error)
RefreshToken exchanges a refresh token for a new ID token and refresh token. The tenant context (if any) is already embedded in the refresh token from the original sign-in.
func (*GoogleIAM) ResetPasswordLink ¶ added in v1.1.1
func (*GoogleIAM) SetCustomUserClaims ¶ added in v1.3.3
func (*GoogleIAM) UpdateAccount ¶
func (c *GoogleIAM) UpdateAccount(ctx context.Context, accountUID string, account UpdateAccountRequest, tenantID ...string) (*UpdateAccountResponse, error)
func (*GoogleIAM) UpdateAccountPassword ¶
func (c *GoogleIAM) UpdateAccountPassword( ctx context.Context, accountUID string, request UpdatePasswordRequest, ) (*SignInResponse, error)
func (*GoogleIAM) VerifyToken ¶ added in v1.1.1
type RefreshTokenRequest ¶ added in v1.3.0
type RefreshTokenResponse ¶ added in v1.3.0
type SignInRequest ¶
type SignInResponse ¶
type SignInResponse struct {
Kind string `json:"kind"`
LocalID string `json:"localId"`
Email string `json:"email"`
DisplayName string `json:"displayName"`
IDToken string `json:"idToken"`
Registered bool `json:"registered"`
RefreshToken string `json:"refreshToken"`
ExpiresIn string `json:"expiresIn"`
}
type SignOutRequest ¶
type SignOutRequest struct {
UUID string `json:"uuid"`
}
type TenantInfo ¶ added in v1.2.0
type UpdateAccountRequest ¶
type UpdateAccountRequest struct {
DisplayName string `json:"display_name"`
}
type UpdateAccountResponse ¶
type UpdateAccountResponse struct {
Account Account `json:"account"`
}
type UpdatePasswordRequest ¶
Click to show internal directories.
Click to hide internal directories.