Documentation ¶
Index ¶
Constants ¶
View Source
const APPLE_BASE_URL = "https://appleid.apple.com"
View Source
const JWKS_APPLE_URI = "/auth/keys"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppleKey ¶
type AppleKey struct { Kty string `json:"kty"` Kid string `json:"kid"` Use string `json:"use"` Alg string `json:"alg"` N string `json:"n"` E string `json:"e"` }
key object fetched from APPLE_KEYS_URL
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetApplePublicKeyObject ¶
locally cache and get apple rsa.PublicKey object
func (*Client) VerifyIdToken ¶
func (c *Client) VerifyIdToken(clientId, idToken string) (*IdTokenResponse, error)
type IdTokenResponse ¶
type IdTokenResponse struct { Aud string `json:"aud"` C_hash string `mapstructure:"c_hash" json:"c_hash"` Email string `json:"email"` EmailVerified string `mapstructure:"email_verified" json:"email_verified"` AuthTime int64 `mapstructure:"auth_time" json:"auth_time"` Exp int64 `json:"exp"` Iat int64 `json:"iat"` Iss string `json:"iss"` Nonce string `json:"nonce"` NonceSupported bool `mapstructure:"nonce_supported" json:"nonce_supported"` Sub string `json:"sub"` }
Click to show internal directories.
Click to hide internal directories.