Documentation
¶
Overview ¶
Package vipaccess provides a client for Symantec's VIP Access credential service.
Index ¶
Constants ¶
const ProvisioningURL = "https://services.vip.symantec.com/prov"
const ValidationURL = "https://vip.symantec.com/otpCheck"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
Credential represents a VIP Access credential issued by Symantec.
func GenerateCredential ¶
func GenerateCredential(p *Parameters) (*Credential, error)
GenerateCredential contacts Symantec to request a new VIP Access credential with the provided parameters.
func (*Credential) QRCodePNG ¶
func (c *Credential) QRCodePNG() []byte
QRCodePNG returns the content of a PNG image encoding the credential as a qr code. The image is suitable for being scanned by an OTP generation app like Google Authenticator or 1Password.
func (*Credential) URI ¶
func (c *Credential) URI() string
URI returns the otpauth URI for the credential.
func (*Credential) Validate ¶
func (c *Credential) Validate() error
Validate sends the credential ID with a current TOTP code to Symantec to verify it is working.
type Parameters ¶
type Parameters struct {
Timestamp int
TokenModel string
OTPAlgorithm string
Manufacturer string
Serial string
Model string
AppHandle string
ClientIDType string
ClientID string
DistChannel string
Platform string
Data string
AccountName string
Issuer string
}
Parameters specify the values expected by Symantec when requesting a new credential.
func GenerateRandomParameters ¶
func GenerateRandomParameters() *Parameters
GenerateRandomParameters returns a valid set of Parameters with somewhat randomized values for the serial number, model, and client ID.