vwidentity

package
v0.0.0-...-175a4df Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

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 Login

func Login(log *util.Logger, q url.Values, user, password string) (url.Values, error)

Login performs VW identity login with optional code challenge

func LoginWithAuthURL

func LoginWithAuthURL(log *util.Logger, uri string, q url.Values, user, password string) (url.Values, error)

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 FormVars

type FormVars struct {
	Action string
	Inputs map[string]string
}

FormVars holds HTML form input values required for login

func FormValues

func FormValues(reader io.Reader, id string) (FormVars, error)

FormValues extracts FormVars from given HTML document

type Service

type Service struct {
	*request.Helper
}

func New

func New(log *util.Logger) *Service

func (*Service) Login

func (v *Service) Login(uri, user, password string) (url.Values, error)

Login performs the identity.vwgroup.io login

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL