Documentation
¶
Index ¶
- Constants
- Variables
- func Login(log *util.Logger, q url.Values, user, password string) (url.Values, error)
- func LoginWithAuthURL(log *util.Logger, uri string, q url.Values, user, password string) (url.Values, error)
- func Oauth2Login(log *util.Logger, oc *oauth2.Config, user, password string) (vag.TokenSource, error)
- type CredentialParams
- type FormVars
- type Oauth2Service
- type Service
Constants ¶
View Source
const ( BaseURL = "https://identity.vwgroup.io" WellKnown = "https://identity.vwgroup.io/.well-known/openid-configuration" )
Variables ¶
View Source
var Config = &oidc.ProviderConfig{
AuthURL: "https://identity.vwgroup.io/oidc/v1/authorize",
TokenURL: "https://identity.vwgroup.io/oidc/v1/token",
UserInfoURL: "https://identity-userinfo.vwgroup.io/oidc/userinfo",
}
Functions ¶
func LoginWithAuthURL ¶
func Oauth2Login ¶
func Oauth2Login(log *util.Logger, oc *oauth2.Config, user, password string) (vag.TokenSource, error)
Login performs VW identity login with optional code challenge
Types ¶
type CredentialParams ¶
type CredentialParams struct { TemplateModel struct { Hmac string `json:"hmac"` RelayState string `json:"relayState"` PostAction string `json:"postAction"` IdentifierUrl string `json:"identifierUrl"` Error string `json:"error"` } `json:"templateModel"` CurrentLocale string `json:"currentLocale"` CsrfParameterName string `json:"csrf_parameterName"` CsrfToken string `json:"csrf_token"` }
func ParseCredentialsPage ¶
func ParseCredentialsPage(r io.ReadCloser) (CredentialParams, error)
type Oauth2Service ¶
func (*Oauth2Service) TokenSource ¶
func (v *Oauth2Service) TokenSource(token *vag.Token) vag.TokenSource
TokenSource creates token source. Token is refreshed automatically.
Click to show internal directories.
Click to hide internal directories.