Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaBuilderAddress() validation.SchemaBuilder
- func SchemaBuilderAddressCountry() validation.SchemaBuilder
- func SchemaBuilderAddressFormatted() validation.SchemaBuilder
- func SchemaBuilderAddressLocality() validation.SchemaBuilder
- func SchemaBuilderAddressPostalCode() validation.SchemaBuilder
- func SchemaBuilderAddressRegion() validation.SchemaBuilder
- func SchemaBuilderAddressStreetAddress() validation.SchemaBuilder
- func SchemaBuilderBirthdate() validation.SchemaBuilder
- func SchemaBuilderEmail() validation.SchemaBuilder
- func SchemaBuilderFamilyName() validation.SchemaBuilder
- func SchemaBuilderForPointerString(ptrStr string) (validation.SchemaBuilder, bool)
- func SchemaBuilderGender() validation.SchemaBuilder
- func SchemaBuilderGivenName() validation.SchemaBuilder
- func SchemaBuilderLocale() validation.SchemaBuilder
- func SchemaBuilderMiddleName() validation.SchemaBuilder
- func SchemaBuilderName() validation.SchemaBuilder
- func SchemaBuilderNickName() validation.SchemaBuilder
- func SchemaBuilderPhoneNumber() validation.SchemaBuilder
- func SchemaBuilderPicture() validation.SchemaBuilder
- func SchemaBuilderPreferredUsername() validation.SchemaBuilder
- func SchemaBuilderProfile() validation.SchemaBuilder
- func SchemaBuilderWebsite() validation.SchemaBuilder
- func SchemaBuilderZoneinfo() validation.SchemaBuilder
- func Validate(t T) error
- type ExtractOptions
- type LoginIDNormalizerFactory
- type Normalizer
- type T
- func (t T) CheckWrite(accessControl accesscontrol.T, role accesscontrol.Role, that T) error
- func (t T) Clone() T
- func (t T) FormattedName() string
- func (t T) FormattedNames() string
- func (t T) MergedWith(that T) T
- func (t T) MergedWithForm(ptrs map[string]string) (T, error)
- func (t T) MergedWithList(l attrs.List) (T, error)
- func (t T) NonIdentityAware() T
- func (t T) ReadWithAccessControl(accessControl accesscontrol.T, role accesscontrol.Role) T
- func (t T) Tidy() T
- func (t T) ToClaims() map[string]interface{}
- func (t T) WithDerivedAttributesRemoved() T
- func (t T) WithNameCopiedToGivenName() T
Constants ¶
View Source
const ( // Sub is not used because we do not always use sub as the unique identifier for // an user from the identity provider. // Sub = "sub" Email = "email" EmailVerified = "email_verified" PhoneNumber = "phone_number" PhoneNumberVerified = "phone_number_verified" PreferredUsername = "preferred_username" FamilyName = "family_name" GivenName = "given_name" MiddleName = "middle_name" Name = "name" Nickname = "nickname" Picture = "picture" Profile = "profile" Website = "website" Gender = "gender" Birthdate = "birthdate" Zoneinfo = "zoneinfo" Locale = "locale" Address = "address" Formatted = "formatted" StreetAddress = "street_address" Locality = "locality" Region = "region" PostalCode = "postal_code" Country = "country" UpdatedAt = "updated_at" )
Variables ¶
View Source
var AccessControlViolated = apierrors.Forbidden.WithReason("AccessControlViolated")
View Source
var DependencySet = wire.NewSet( wire.Struct(new(Normalizer), "*"), )
View Source
var NonIdentityAwareKeys []string = []string{ FamilyName, GivenName, MiddleName, Name, Nickname, Picture, Profile, Website, Gender, Birthdate, Zoneinfo, Locale, Address, }
View Source
var StandardAttributesEmailRequired = apierrors.BadRequest.WithReason("StandardAttributesEmailRequired")
Functions ¶
func SchemaBuilderAddress ¶
func SchemaBuilderAddress() validation.SchemaBuilder
func SchemaBuilderAddressCountry ¶
func SchemaBuilderAddressCountry() validation.SchemaBuilder
func SchemaBuilderAddressFormatted ¶
func SchemaBuilderAddressFormatted() validation.SchemaBuilder
func SchemaBuilderAddressLocality ¶
func SchemaBuilderAddressLocality() validation.SchemaBuilder
func SchemaBuilderAddressPostalCode ¶
func SchemaBuilderAddressPostalCode() validation.SchemaBuilder
func SchemaBuilderAddressRegion ¶
func SchemaBuilderAddressRegion() validation.SchemaBuilder
func SchemaBuilderAddressStreetAddress ¶
func SchemaBuilderAddressStreetAddress() validation.SchemaBuilder
func SchemaBuilderBirthdate ¶
func SchemaBuilderBirthdate() validation.SchemaBuilder
func SchemaBuilderEmail ¶
func SchemaBuilderEmail() validation.SchemaBuilder
func SchemaBuilderFamilyName ¶
func SchemaBuilderFamilyName() validation.SchemaBuilder
func SchemaBuilderForPointerString ¶
func SchemaBuilderForPointerString(ptrStr string) (validation.SchemaBuilder, bool)
func SchemaBuilderGender ¶
func SchemaBuilderGender() validation.SchemaBuilder
func SchemaBuilderGivenName ¶
func SchemaBuilderGivenName() validation.SchemaBuilder
func SchemaBuilderLocale ¶
func SchemaBuilderLocale() validation.SchemaBuilder
func SchemaBuilderMiddleName ¶
func SchemaBuilderMiddleName() validation.SchemaBuilder
func SchemaBuilderName ¶
func SchemaBuilderName() validation.SchemaBuilder
func SchemaBuilderNickName ¶
func SchemaBuilderNickName() validation.SchemaBuilder
func SchemaBuilderPhoneNumber ¶
func SchemaBuilderPhoneNumber() validation.SchemaBuilder
func SchemaBuilderPicture ¶
func SchemaBuilderPicture() validation.SchemaBuilder
func SchemaBuilderPreferredUsername ¶
func SchemaBuilderPreferredUsername() validation.SchemaBuilder
func SchemaBuilderProfile ¶
func SchemaBuilderProfile() validation.SchemaBuilder
func SchemaBuilderWebsite ¶
func SchemaBuilderWebsite() validation.SchemaBuilder
func SchemaBuilderZoneinfo ¶
func SchemaBuilderZoneinfo() validation.SchemaBuilder
Types ¶
type ExtractOptions ¶
type ExtractOptions struct {
EmailRequired bool
}
type LoginIDNormalizerFactory ¶
type LoginIDNormalizerFactory interface {
NormalizerWithLoginIDType(loginIDKeyType model.LoginIDKeyType) internalinterface.LoginIDNormalizer
}
type Normalizer ¶
type Normalizer struct {
LoginIDNormalizerFactory LoginIDNormalizerFactory
}
func (*Normalizer) Normalize ¶
func (n *Normalizer) Normalize(t T) error
type T ¶
type T map[string]interface{}
func Extract ¶
func Extract(claims map[string]interface{}, opts ExtractOptions) (T, error)
Extract extracts OIDC standard claims. The output is NOT normalized.
func (T) CheckWrite ¶
func (t T) CheckWrite(accessControl accesscontrol.T, role accesscontrol.Role, that T) error
func (T) FormattedName ¶
func (T) FormattedNames ¶
func (T) MergedWith ¶
MergedWith returns a T with that merged into t.
func (T) NonIdentityAware ¶
NonIdentityAware returns a copy of t with identity-aware attributes removed.
func (T) ReadWithAccessControl ¶
func (t T) ReadWithAccessControl(accessControl accesscontrol.T, role accesscontrol.Role) T
func (T) WithDerivedAttributesRemoved ¶
func (T) WithNameCopiedToGivenName ¶
Click to show internal directories.
Click to hide internal directories.