Documentation
¶
Index ¶
- Constants
- func GetOAuthURLIdentifierKey(state string) string
- type GetPublicKeyResp
- type OAuth
- type Option
- func WithClientID(clientID string) Option
- func WithKeyId(keyId string) Option
- func WithKeySecret(clientSecret string) Option
- func WithKeySecretFile(clientSecretFile string) Option
- func WithRedirectURL(redirectURL string) Option
- func WithScope(scope ...string) Option
- func WithTeamId(teamId string) Option
- type Options
Constants ¶
View Source
const ( // BuildOAuthPageURL Apple OAuth2 构建授权页面 URL 的请求地址 BuildOAuthPageURL = "https://appleid.apple.com/auth/authorize" // EndpointPublicKeyURL Apple OAuth2 获取公钥的请求地址 EndpointPublicKeyURL = "https://appleid.apple.com/auth/keys" // EndpointTokenURL Apple OAuth2 获取 Token 的请求地址 EndpointTokenURL = "https://appleid.apple.com/auth/token" )
View Source
const ( ScopeOpenId = "openid" // OpenID ScopeEmail = "email" // 邮箱 ScopeName = "name" // 姓名 )
View Source
const (
// OAuthUrlIdentifierKey 构建生成的授权 URL 标识键,用于验证授权来源
OAuthUrlIdentifierKey = "apple.oauth2.url.identifier.%s"
)
Variables ¶
This section is empty.
Functions ¶
func GetOAuthURLIdentifierKey ¶ added in v0.5.17
Types ¶
type GetPublicKeyResp ¶ added in v0.5.17
type GetPublicKeyResp struct { Keys []struct { Kid string `json:"kid"` N string `json:"n"` E string `json:"e"` } `json:"keys"` }
GetPublicKeyResp 获取公钥响应参数
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func (*OAuth) BuildAuthPageURL ¶ added in v0.5.17
func (*OAuth) HandleOAuth2ByAPPAuthToken ¶ added in v0.5.17
func (*OAuth) HandleOAuth2ByAuthCode ¶ added in v0.5.17
type Option ¶
type Option func(o *Options)
func WithClientID ¶
func WithKeySecret ¶ added in v0.5.29
func WithKeySecretFile ¶ added in v0.5.29
func WithRedirectURL ¶
func WithTeamId ¶
Click to show internal directories.
Click to hide internal directories.