Documentation
¶
Index ¶
- type BaseModel
- type ClaimModel
- type DeletableBaseModel
- type IAddress
- type IUserClaims
- type JTIModel
- type SavedProfile
- func (sp *SavedProfile) GormDBDataType(db *gorm.DB, _ *schema.Field) string
- func (sp *SavedProfile) MarshalJSON() ([]byte, error)
- func (sp *SavedProfile) Scan(src interface{}) error
- func (sp *SavedProfile) UnmarshalJSON(bytes []byte) error
- func (sp *SavedProfile) Value() (marshal driver.Value, err error)
- type ScopeModel
- type SecretChannelModel
- type SecretModel
- type ServiceProviderMetadata
- func (spm *ServiceProviderMetadata) DeleteAttribute(attrName string)
- func (spm *ServiceProviderMetadata) GetAttribute(attrName string) interface{}
- func (spm *ServiceProviderMetadata) GormDBDataType(db *gorm.DB, _ *schema.Field) string
- func (spm *ServiceProviderMetadata) Scan(src interface{}) error
- func (spm *ServiceProviderMetadata) SetAttribute(attrName string, value interface{})
- func (spm *ServiceProviderMetadata) Value() (marshal driver.Value, err error)
- type ServiceProviderModel
- func (sp ServiceProviderModel) AutoMigrate(db gorm.Migrator) error
- func (sp ServiceProviderModel) GetApprovedGrantTypes() oidcsdk.Arguments
- func (sp ServiceProviderModel) GetApprovedScopes() oidcsdk.Arguments
- func (sp ServiceProviderModel) GetID() string
- func (sp ServiceProviderModel) GetIDTokenSigningAlg() jose.SignatureAlgorithm
- func (sp ServiceProviderModel) GetPostLogoutRedirectURIs() []string
- func (sp ServiceProviderModel) GetRedirectURIs() []string
- func (sp ServiceProviderModel) GetSecret() string
- func (sp ServiceProviderModel) IsPublic() bool
- func (sp ServiceProviderModel) TableName() string
- type TokensModel
- type UserAddress
- func (u UserAddress) GetAttribute(name string) interface{}
- func (u UserAddress) GetCountry() string
- func (u UserAddress) GetFormatted() string
- func (u UserAddress) GetLocality() string
- func (u UserAddress) GetPostalCode() string
- func (u UserAddress) GetRegion() string
- func (u UserAddress) GetStreetAddress() string
- func (u UserAddress) SetAttribute(name string, value interface{})
- func (u UserAddress) SetCountry(country string)
- func (u UserAddress) SetFormatted(formatted string)
- func (u UserAddress) SetLocality(locality string)
- func (u UserAddress) SetPostalCode(postalCode string)
- func (u UserAddress) SetRegion(region string)
- func (u UserAddress) SetStreetAddress(streetAddress string)
- type UserCredentials
- type UserMetadata
- func (u *UserMetadata) GetAddress() IAddress
- func (u *UserMetadata) GetAttribute(name string) interface{}
- func (u *UserMetadata) GetBirthDate() string
- func (u *UserMetadata) GetEmail() string
- func (u *UserMetadata) GetEmailVerified() bool
- func (u *UserMetadata) GetFamilyName() string
- func (u *UserMetadata) GetGender() string
- func (u *UserMetadata) GetGivenName() string
- func (u *UserMetadata) GetLocale() string
- func (u *UserMetadata) GetMiddleName() string
- func (u *UserMetadata) GetName() string
- func (u *UserMetadata) GetNickname() string
- func (u *UserMetadata) GetPhoneNumber() string
- func (u *UserMetadata) GetPhoneNumberVerified() bool
- func (u *UserMetadata) GetPicture() string
- func (u *UserMetadata) GetPreferredUsername() string
- func (u *UserMetadata) GetProfile() string
- func (u *UserMetadata) GetWebsite() string
- func (u *UserMetadata) GetZoneInfo() string
- func (u *UserMetadata) GormDBDataType(db *gorm.DB, _ *schema.Field) string
- func (u *UserMetadata) Scan(src interface{}) error
- func (u *UserMetadata) SetAddress(address IAddress)
- func (u *UserMetadata) SetAttribute(name string, value interface{})
- func (u *UserMetadata) SetBirthDate(birthDate string)
- func (u *UserMetadata) SetEmail(email string)
- func (u *UserMetadata) SetEmailVerified(emailVerified bool)
- func (u *UserMetadata) SetFamilyName(familyName string)
- func (u *UserMetadata) SetGender(gender string)
- func (u *UserMetadata) SetGivenName(givenName string)
- func (u *UserMetadata) SetLocale(locale string)
- func (u *UserMetadata) SetMiddleName(middleName string)
- func (u *UserMetadata) SetName(name string)
- func (u *UserMetadata) SetNickname(nickname string)
- func (u *UserMetadata) SetPhoneNumber(phoneNumber string)
- func (u *UserMetadata) SetPhoneNumberVerified(phoneNumberVerified bool)
- func (u *UserMetadata) SetPicture(picture string)
- func (u *UserMetadata) SetPreferredUsername(preferredUsername string)
- func (u *UserMetadata) SetProfile(profile string)
- func (u *UserMetadata) SetWebsite(website string)
- func (u *UserMetadata) SetZoneInfo(zoneInfo string)
- func (u *UserMetadata) Value() (driver.Value, error)
- type UserModel
- type UserOTP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct {
DeletableBaseModel
DeletedAt *time.Time `gorm:"column:deleted_at;index" json:"deleted_at,omitempty"`
}
type ClaimModel ¶
type ClaimModel struct {
BaseModel
Name string `gorm:"column:name;size:256;index:idx_claim_name,unique" json:"name,omitempty"`
Description *string `gorm:"column:description;size:1024" json:"description,omitempty"`
}
func (ClaimModel) AutoMigrate ¶
func (cm ClaimModel) AutoMigrate(db gorm.Migrator) error
func (ClaimModel) TableName ¶
func (cm ClaimModel) TableName() string
type DeletableBaseModel ¶
type IAddress ¶
type IAddress interface {
GetFormatted() string
SetFormatted(formatted string)
GetStreetAddress() string
SetStreetAddress(streetAddress string)
GetLocality() string
SetLocality(locality string)
GetRegion() string
SetRegion(region string)
GetPostalCode() string
SetPostalCode(postalCode string)
GetCountry() string
SetCountry(country string)
GetAttribute(name string) interface{}
SetAttribute(name string, value interface{})
}
type IUserClaims ¶
type IUserClaims interface {
GetName() string
SetName(name string)
GetGivenName() string
SetGivenName(givenName string)
GetFamilyName() string
SetFamilyName(familyName string)
GetMiddleName() string
SetMiddleName(middleName string)
GetNickname() string
SetNickname(nickname string)
GetPreferredUsername() string
SetPreferredUsername(preferredUsername string)
GetProfile() string
SetProfile(profile string)
GetPicture() string
SetPicture(picture string)
GetWebsite() string
SetWebsite(website string)
GetEmail() string
SetEmail(email string)
GetEmailVerified() bool
SetEmailVerified(emailVerified bool)
GetGender() string
SetGender(gender string)
GetBirthDate() string
SetBirthDate(birthDate string)
GetZoneInfo() string
SetZoneInfo(zoneInfo string)
GetLocale() string
SetLocale(locale string)
GetPhoneNumber() string
SetPhoneNumber(phoneNumber string)
GetPhoneNumberVerified() bool
SetPhoneNumberVerified(phoneNumberVerified bool)
GetAddress() IAddress
SetAddress(address IAddress)
GetAttribute(name string) interface{}
SetAttribute(name string, value interface{})
}
type JTIModel ¶
type SavedProfile ¶
func (*SavedProfile) GormDBDataType ¶
func (*SavedProfile) MarshalJSON ¶
func (sp *SavedProfile) MarshalJSON() ([]byte, error)
func (*SavedProfile) Scan ¶
func (sp *SavedProfile) Scan(src interface{}) error
func (*SavedProfile) UnmarshalJSON ¶
func (sp *SavedProfile) UnmarshalJSON(bytes []byte) error
type ScopeModel ¶
type ScopeModel struct {
BaseModel
Name string `gorm:"column:name;size:256;index:idx_scope_name,unique" json:"name,omitempty"`
Description *string `gorm:"column:description;size:1024" json:"description,omitempty"`
Claims []*ClaimModel `gorm:"many2many:t_scope_claim"`
}
func (ScopeModel) AutoMigrate ¶
func (sm ScopeModel) AutoMigrate(db gorm.Migrator) error
func (ScopeModel) TableName ¶
func (sm ScopeModel) TableName() string
type SecretChannelModel ¶
type SecretChannelModel struct {
BaseModel
Name string `gorm:"column:name;index:idx_channel_name,unique" json:"name"`
Algorithm string `gorm:"column:algorithm;index:idx_alg_use,unique" json:"algorithm"`
Use string `gorm:"column:key_usage;index:idx_alg_use,unique" json:"use"`
ValidityDay uint `gorm:"column:validity_day" json:"validity_day"`
Secrets []*SecretModel `gorm:"foreignKey:ChannelId" json:"secrets"`
}
func (SecretChannelModel) AutoMigrate ¶
func (sp SecretChannelModel) AutoMigrate(db gorm.Migrator) error
func (SecretChannelModel) TableName ¶
func (sp SecretChannelModel) TableName() string
type SecretModel ¶
type SecretModel struct {
BaseModel
KeyId string `gorm:"column:key_id" json:"key_id"`
IssuedAt time.Time `gorm:"column:issued_at" json:"issued_at"`
ExpiresAt time.Time `gorm:"column:expires_at" json:"expires_at"`
Value []byte `gorm:"column:value" json:"-"`
ChannelId uint `gorm:"column:channel_id" json:"channel_id"`
Algorithm string `gorm:"column:algorithm" json:"-"`
Use string `gorm:"column:key_usage" json:"-"`
}
func (SecretModel) AutoMigrate ¶
func (sp SecretModel) AutoMigrate(db gorm.Migrator) error
func (SecretModel) TableName ¶
func (sp SecretModel) TableName() string
type ServiceProviderMetadata ¶
type ServiceProviderMetadata struct {
ClientName string `json:"client_name,omitempty"`
RedirectUris []string `json:"redirect_uris,omitempty"`
PostLogoutRedirectUris []string `json:"post_logout_redirect_uris,omitempty"`
ResponseTypes []string `json:"response_types,omitempty"`
Scopes []string `json:"scopes,omitempty"`
GrantTypes []string `json:"grant_types,omitempty"`
ApplicationType string `json:"application_type,omitempty"`
Contacts *[]string `json:"contacts,omitempty"`
LogoUri *string `json:"logo_uri,omitempty"`
ClientUri *string `json:"client_uri,omitempty"`
PolicyUri *string `json:"policy_uri,omitempty"`
TosUri string `json:"tos_uri,omitempty"`
JwksUri *string `json:"jwks_uri,omitempty"`
Jwks *jose.JSONWebKeySet `json:"jwks,omitempty"`
SectorIdentifierUri string `json:"sector_identifier_uri,omitempty"`
SubjectType string `json:"subject_type,omitempty"`
IdTokenSignedResponseAlg string `json:"id_token_signed_response_alg,omitempty"`
IdTokenEncryptedResponseAlg *string `json:"id_token_encrypted_response_alg,omitempty"`
IdTokenEncryptedResponseEnc *string `json:"id_token_encrypted_response_enc,omitempty"`
UserinfoSignedResponseAlg *string `json:"userinfo_signed_response_alg,omitempty"`
UserinfoEncryptedResponseAlg *string `json:"userinfo_encrypted_response_alg,omitempty"`
UserinfoEncryptedResponseEnc *string `json:"userinfo_encrypted_response_enc,omitempty"`
RequestObjectSigningAlg *string `json:"request_object_signing_alg,omitempty"`
RequestObjectEncryptionAlg *string `json:"request_object_encryption_alg,omitempty"`
RequestObjectEncryptionEnc *string `json:"request_object_encryption_enc,omitempty"`
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"`
TokenEndpointAuthSigningAlg *string `json:"token_endpoint_auth_signing_alg,omitempty"`
DefaultMaxAge *int `json:"default_max_age,omitempty"`
RequireAuthTime *bool `json:"require_auth_time,omitempty"`
DefaultAcrValues *[]string `json:"default_acr_values,omitempty"`
InitiateLoginUri *string `json:"initiate_login_uri,omitempty"`
RequestUris []string `json:"request_uris,omitempty"`
OtherAttributes map[string]interface{} `json:"other_attributes,omitempty"`
}
func (*ServiceProviderMetadata) DeleteAttribute ¶
func (spm *ServiceProviderMetadata) DeleteAttribute(attrName string)
func (*ServiceProviderMetadata) GetAttribute ¶
func (spm *ServiceProviderMetadata) GetAttribute(attrName string) interface{}
func (*ServiceProviderMetadata) GormDBDataType ¶
func (*ServiceProviderMetadata) Scan ¶
func (spm *ServiceProviderMetadata) Scan(src interface{}) error
func (*ServiceProviderMetadata) SetAttribute ¶
func (spm *ServiceProviderMetadata) SetAttribute(attrName string, value interface{})
type ServiceProviderModel ¶
type ServiceProviderModel struct {
BaseModel
Name string `gorm:"column:name;not null" json:"name,omitempty"`
Description *string `gorm:"column:description;size:1024" json:"description,omitempty"`
ClientID string `gorm:"column:client_id;index:uk_client_id,unique;not null" json:"client_id,omitempty"`
ClientSecret string `gorm:"column:client_secret" json:"client_secret,omitempty"`
Active bool `gorm:"column:active" json:"active,omitempty"`
Public bool `gorm:"column:public" json:"public,omitempty"`
Metadata *ServiceProviderMetadata `gorm:"column:metadata" json:"metadata,omitempty"`
}
func (ServiceProviderModel) AutoMigrate ¶
func (sp ServiceProviderModel) AutoMigrate(db gorm.Migrator) error
func (ServiceProviderModel) GetApprovedGrantTypes ¶
func (sp ServiceProviderModel) GetApprovedGrantTypes() oidcsdk.Arguments
func (ServiceProviderModel) GetApprovedScopes ¶
func (sp ServiceProviderModel) GetApprovedScopes() oidcsdk.Arguments
func (ServiceProviderModel) GetID ¶
func (sp ServiceProviderModel) GetID() string
func (ServiceProviderModel) GetIDTokenSigningAlg ¶
func (sp ServiceProviderModel) GetIDTokenSigningAlg() jose.SignatureAlgorithm
func (ServiceProviderModel) GetPostLogoutRedirectURIs ¶ added in v0.7.0
func (sp ServiceProviderModel) GetPostLogoutRedirectURIs() []string
func (ServiceProviderModel) GetRedirectURIs ¶
func (sp ServiceProviderModel) GetRedirectURIs() []string
func (ServiceProviderModel) GetSecret ¶
func (sp ServiceProviderModel) GetSecret() string
func (ServiceProviderModel) IsPublic ¶
func (sp ServiceProviderModel) IsPublic() bool
func (ServiceProviderModel) TableName ¶
func (sp ServiceProviderModel) TableName() string
type TokensModel ¶
type TokensModel struct {
BaseModel
RequestID string `gorm:"column:request_id;not null" json:"request_id,omitempty"`
ACSignature sql.NullString `gorm:"column:ac_signature;size:512;index:idx_token_ac" json:"ac_signature,omitempty"`
ATSignature sql.NullString `gorm:"column:at_signature;size:512;index:idx_token_at" json:"at_signature,omitempty"`
RTSignature sql.NullString `gorm:"column:rt_signature;size:512;index:idx_token_rt" json:"rt_signature,omitempty"`
RTExpiry sql.NullTime `gorm:"column:rt_expiry" json:"rt_expiry,omitempty"`
ATExpiry sql.NullTime `gorm:"column:at_expiry" json:"at_expiry,omitempty"`
ACExpiry sql.NullTime `gorm:"column:ac_expiry" json:"ac_expiry,omitempty"`
RequestProfile *SavedProfile `gorm:"column:request_profile" json:"request_profile,omitempty"`
}
func (TokensModel) AutoMigrate ¶
func (tm TokensModel) AutoMigrate(db gorm.Migrator) error
func (TokensModel) TableName ¶
func (tm TokensModel) TableName() string
type UserAddress ¶
type UserAddress map[string]interface{}
func (UserAddress) GetAttribute ¶
func (u UserAddress) GetAttribute(name string) interface{}
func (UserAddress) GetCountry ¶
func (u UserAddress) GetCountry() string
func (UserAddress) GetFormatted ¶
func (u UserAddress) GetFormatted() string
func (UserAddress) GetLocality ¶
func (u UserAddress) GetLocality() string
func (UserAddress) GetPostalCode ¶
func (u UserAddress) GetPostalCode() string
func (UserAddress) GetRegion ¶
func (u UserAddress) GetRegion() string
func (UserAddress) GetStreetAddress ¶
func (u UserAddress) GetStreetAddress() string
func (UserAddress) SetAttribute ¶
func (u UserAddress) SetAttribute(name string, value interface{})
func (UserAddress) SetCountry ¶
func (u UserAddress) SetCountry(country string)
func (UserAddress) SetFormatted ¶
func (u UserAddress) SetFormatted(formatted string)
func (UserAddress) SetLocality ¶
func (u UserAddress) SetLocality(locality string)
func (UserAddress) SetPostalCode ¶
func (u UserAddress) SetPostalCode(postalCode string)
func (UserAddress) SetRegion ¶
func (u UserAddress) SetRegion(region string)
func (UserAddress) SetStreetAddress ¶
func (u UserAddress) SetStreetAddress(streetAddress string)
type UserCredentials ¶
type UserCredentials struct {
DeletableBaseModel
UserID uint `gorm:"column:user_id;not null;index:uk_user_cred_type,unique" json:"-"`
Type uint8 `gorm:"column:cred_type;auto_increment:false;index:uk_user_cred_type,unique" json:"cred_type,omitempty"`
Value string `gorm:"column:value;size:2048" json:"value,omitempty"`
FirstInvalidAttempt *time.Time `gorm:"column:first_invalid_attempt" json:"first_invalid_attempt,omitempty"`
InvalidAttemptCount uint `gorm:"column:invalid_attempt_count" json:"invalid_attempt_count,omitempty"`
Bocked bool `gorm:"column:blocked" json:"bocked,omitempty"`
}
func (UserCredentials) AutoMigrate ¶
func (uc UserCredentials) AutoMigrate(db gorm.Migrator) error
func (*UserCredentials) IncrementInvalidAttempt ¶
func (uc *UserCredentials) IncrementInvalidAttempt(maxAllowed uint, window time.Duration) (blocked bool)
func (UserCredentials) TableName ¶
func (uc UserCredentials) TableName() string
type UserMetadata ¶
type UserMetadata map[string]interface{}
func (*UserMetadata) GetAddress ¶
func (u *UserMetadata) GetAddress() IAddress
func (*UserMetadata) GetAttribute ¶
func (u *UserMetadata) GetAttribute(name string) interface{}
func (*UserMetadata) GetBirthDate ¶
func (u *UserMetadata) GetBirthDate() string
func (*UserMetadata) GetEmail ¶
func (u *UserMetadata) GetEmail() string
func (*UserMetadata) GetEmailVerified ¶
func (u *UserMetadata) GetEmailVerified() bool
func (*UserMetadata) GetFamilyName ¶
func (u *UserMetadata) GetFamilyName() string
func (*UserMetadata) GetGender ¶
func (u *UserMetadata) GetGender() string
func (*UserMetadata) GetGivenName ¶
func (u *UserMetadata) GetGivenName() string
func (*UserMetadata) GetLocale ¶
func (u *UserMetadata) GetLocale() string
func (*UserMetadata) GetMiddleName ¶
func (u *UserMetadata) GetMiddleName() string
func (*UserMetadata) GetName ¶
func (u *UserMetadata) GetName() string
func (*UserMetadata) GetNickname ¶
func (u *UserMetadata) GetNickname() string
func (*UserMetadata) GetPhoneNumber ¶
func (u *UserMetadata) GetPhoneNumber() string
func (*UserMetadata) GetPhoneNumberVerified ¶
func (u *UserMetadata) GetPhoneNumberVerified() bool
func (*UserMetadata) GetPicture ¶
func (u *UserMetadata) GetPicture() string
func (*UserMetadata) GetPreferredUsername ¶
func (u *UserMetadata) GetPreferredUsername() string
func (*UserMetadata) GetProfile ¶
func (u *UserMetadata) GetProfile() string
func (*UserMetadata) GetWebsite ¶
func (u *UserMetadata) GetWebsite() string
func (*UserMetadata) GetZoneInfo ¶
func (u *UserMetadata) GetZoneInfo() string
func (*UserMetadata) GormDBDataType ¶
func (*UserMetadata) Scan ¶
func (u *UserMetadata) Scan(src interface{}) error
func (*UserMetadata) SetAddress ¶
func (u *UserMetadata) SetAddress(address IAddress)
func (*UserMetadata) SetAttribute ¶
func (u *UserMetadata) SetAttribute(name string, value interface{})
func (*UserMetadata) SetBirthDate ¶
func (u *UserMetadata) SetBirthDate(birthDate string)
func (*UserMetadata) SetEmail ¶
func (u *UserMetadata) SetEmail(email string)
func (*UserMetadata) SetEmailVerified ¶
func (u *UserMetadata) SetEmailVerified(emailVerified bool)
func (*UserMetadata) SetFamilyName ¶
func (u *UserMetadata) SetFamilyName(familyName string)
func (*UserMetadata) SetGender ¶
func (u *UserMetadata) SetGender(gender string)
func (*UserMetadata) SetGivenName ¶
func (u *UserMetadata) SetGivenName(givenName string)
func (*UserMetadata) SetLocale ¶
func (u *UserMetadata) SetLocale(locale string)
func (*UserMetadata) SetMiddleName ¶
func (u *UserMetadata) SetMiddleName(middleName string)
func (*UserMetadata) SetName ¶
func (u *UserMetadata) SetName(name string)
func (*UserMetadata) SetNickname ¶
func (u *UserMetadata) SetNickname(nickname string)
func (*UserMetadata) SetPhoneNumber ¶
func (u *UserMetadata) SetPhoneNumber(phoneNumber string)
func (*UserMetadata) SetPhoneNumberVerified ¶
func (u *UserMetadata) SetPhoneNumberVerified(phoneNumberVerified bool)
func (*UserMetadata) SetPicture ¶
func (u *UserMetadata) SetPicture(picture string)
func (*UserMetadata) SetPreferredUsername ¶
func (u *UserMetadata) SetPreferredUsername(preferredUsername string)
func (*UserMetadata) SetProfile ¶
func (u *UserMetadata) SetProfile(profile string)
func (*UserMetadata) SetWebsite ¶
func (u *UserMetadata) SetWebsite(website string)
func (*UserMetadata) SetZoneInfo ¶
func (u *UserMetadata) SetZoneInfo(zoneInfo string)
type UserModel ¶
type UserModel struct {
BaseModel
Username string `gorm:"column:username;index:idx_user_name,unique" json:"username,omitempty"`
EmailAddress string `gorm:"column:email_address;size:512;index:idx_user_email,unique" json:"email_address,omitempty"`
TempEmailAddress string `gorm:"column:temp_email_address;size:512;" json:"-"`
Metadata *UserMetadata `gorm:"column:metadata" json:"metadata,omitempty"`
Credentials []UserCredentials `gorm:"foreignKey:UserID" json:"credentials,omitempty"`
Inactive bool `gorm:"column:inactive" json:"inactive,omitempty"`
}
type UserOTP ¶
type UserOTP struct {
ID uint `gorm:"column:id;primary_key" json:"id,omitempty"`
CreatedAt time.Time `gorm:"column:created_at" json:"created_at,omitempty"`
DeletedAt *time.Time `gorm:"column:deleted_at;index" json:"deleted_at,omitempty"`
ValueHash string `gorm:"column:hash_value;index" json:"value_hash,omitempty"`
UserID uint `gorm:"column:user_id;index:uk_user_otp_id,unique" json:"user_id"`
}
Click to show internal directories.
Click to hide internal directories.