# Packages
Package sender provides email sender.
# Functions
LoadApplePrivateKeyFromFile return instance for pre-defined loader function from local file.
NewApple create new AppleProvider instance with a user parameters Private key must be set, when instance create call, for create `client_secret`.
NewBattlenet makes Battle.net oauth2 provider.
NewCustom creates a handler for go-oauth2/oauth2 server.
NewCustomServer is helper function to initiate a customer server and prefill options needed for provider registration (see Service.AddCustomProvider).
NewDev makes dev oauth2 provider for admin user.
NewDiscord makes discord oauth2 provider.
NewFacebook makes facebook oauth2 provider.
NewGithub makes github oauth2 provider.
NewGoogle makes google oauth2 provider.
NewMicrosoft makes microsoft azure oauth2 provider.
NewPatreon makes patreon oauth2 provider.
NewService makes service for given provider.
NewTelegramAPI returns initialized TelegramAPI implementation.
NewTwitter makes twitter oauth2 provider.
NewYandex makes yandex oauth2 provider.
# Constants
AcceptJSONHeader is the content to accept from response.
MaxHTTPBodySize defines max http body size.
# Structs
AppleConfig is the main oauth2 required parameters for "Sign in with Apple".
AppleHandler implements login via Apple ID.
CustomHandlerOpt are options to initialize a handler for oauth2 server.
CustomServer is a wrapper over go-oauth2/oauth2 server running on its own port.
CustomServerOpt are options to initialize a custom go-oauth2/oauth2 server.
DevAuthServer is a fake oauth server for development it provides stand-alone server running on its own port and pretending to be the real oauth2.
DirectHandler implements non-oauth2 provider authorizing user in traditional way with storage with users and hashes.
LoadFromFileFunc is the type for use pre-defined private key loader function Path field must be set with actual path to private key file.
Oauth1Handler implements /login, /callback and /logout handlers for oauth1 flow.
Oauth2Handler implements /login, /callback and /logout handlers from aouth2 flow.
Params to make initialized and ready to use provider.
Service represents oauth2 provider.
TelegramHandler implements login via telegram.
VerifyHandler implements non-oauth2 provider authorizing users with some confirmation.
# Interfaces
AvatarSaver defines minimal interface to save avatar.
CredChecker defines interface to check credentials.
PrivateKeyLoaderInterface interface for implement custom loader for Apple private key from user source.
Provider defines interface for auth handler.
Sender defines interface to send emails.
TelegramAPI is used for interacting with telegram API.
TokenService defines interface accessing tokens.
VerifTokenService defines interface accessing tokens.
# Type aliases
BearerTokenHook accepts provider name, user and token, received during oauth2 authentication.
CredCheckerFunc type is an adapter to allow the use of ordinary functions as CredsChecker.
SenderFunc type is an adapter to allow the use of ordinary functions as Sender.
UserAttributes is the type that will be used to map user data from provider to token.User.
UserData is type for user information returned from oauth2 providers /info API method.
UserIDFunc allows to provide custom func making userID instead of the default based on user's name hash.