Documentation ¶
Index ¶
Constants ¶
View Source
const ( // List containing the users addresses. Will always contain home, but can // also include work and other. ScopeAdress = "address" // User birth date (BankID verified) ScopeBirthDate = "birthDate" // User email (verified), the flag "email_verified : true" in the response // can be used by merchant to confirm for each request that the email // actually is verified ScopeEmail = "email" // User first, middle and given name (verified with National Population // Register) ScopeName = "name" // Verified phone number (verfied - the number used with Vipps) ScopePhoneNumber = "phoneNumber" // Norwegian national identity number (verified with BankID) ScopeNNIN = "nnin" // User bank account numbers ScopeAccountNumbers = "accountNumbers" // Signals that version 2 of the API should be used ScopeAPIV2 = "api_version_2" )
List of possible scopes supported by Vipps Login
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { Address struct { Country string `json:"country"` Street string `json:"street_address"` Type string `json:"address_type"` Formatted string `json:"formatted"` Zip string `json:"postal_code"` Region string `json:"region"` } `json:"address"` OtherAddress []struct { Country string `json:"country"` Street string `json:"street_address"` Type string `json:"address_type"` Formatted string `json:"formatted"` Zip string `json:"postal_code"` Region string `json:"region"` } `json:"other_address"` NIN string `json:"nin"` PhoneNumber string `json:"phone_number"` Name string `json:"name"` BirthDate Date `json:"birthdate"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` UserID string `json:"sub"` }
Claims represents the claims contained in Vipps ID tokens
type Date ¶ added in v0.6.0
func (*Date) UnmarshalJSON ¶ added in v0.6.0
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a convenience wrapper around oidc.Provider tailored to the Vipps Login API
func NewProvider ¶ added in v0.6.0
func NewProvider(ctx context.Context, config *ProviderConfig) (*Provider, error)
NewProvider returns a configured Vipps Login Provider.
func (*Provider) AuthCodeURL ¶
AuthCodeURL returns a URL to OAuth 2.0 provider's consent page that asks for permissions for the configured scopes explicitly
Click to show internal directories.
Click to hide internal directories.