token

package
v0.0.0-...-36afb83 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePKCS8PrivateKeyFromPEM

func ParsePKCS8PrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error)

ParsePKCS8PrivateKeyFromPEM parses PEM encoded PKCS8 Private Key Structure.

Types

type Generator

type Generator struct {
	// A 10-character key identifier (kid) key, obtained from your developer account.
	KeyId string

	// The issuer (iss) registered claim key, whose value is your 10-character Team ID,
	// obtained from your developer account.
	TeamId string

	// TTL (time-to-live), must not be greater than 15777000 (6 months in seconds).
	TTL int64

	// MusicKit private key.
	Secret []byte
}

Generator is a generator of Apple Music JWT token.

func (Generator) Generate

func (g Generator) Generate() (string, error)

Generate generates a JWT token.

Jump to

Keyboard shortcuts

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