Documentation ¶
Index ¶
Constants ¶
View Source
const ( APPLE_BASE_URL = "https://appleid.apple.com" 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 `json:"c_hash" mapstructure:"c_hash"` Email string `json:"email"` EmailVerified bool `json:"email_verified" mapstructure:"email_verified"` IsPrivateEmail bool `json:"is_private_email" mapstructure:"is_private_email"` AuthTime int64 `json:"auth_time" mapstructure:"auth_time"` Exp int64 `json:"exp"` Iat int64 `json:"iat"` Iss string `json:"iss"` Nonce string `json:"nonce"` NonceSupported bool `json:"nonce_supported" mapstructure:"nonce_supported"` Sub string `json:"sub"` }
Click to show internal directories.
Click to hide internal directories.