Documentation ¶
Overview ¶
Package evesso provides support for EVE's single sign-on API.
Package evesso provides support for EVE's single sign-on API.
Index ¶
Constants ¶
View Source
const (
// PublicData is the only scope available at present.
PublicData = "publicData"
)
Variables ¶
View Source
var ( // Endpoint is the production EVE Online cluster. (Tranquility) Endpoint = oauth2.Endpoint{ AuthURL: "https://login.eveonline.com/oauth/authorize", TokenURL: "https://login.eveonline.com/oauth/token", } // TestEndpoint is the public testing EVE Online cluster. (Singularity) TestEndpoint = oauth2.Endpoint{ AuthURL: "https://sisilogin.testeveonline.com/oauth/authorize", TokenURL: "https://sisilogin.testeveonline.com/oauth/token", } )
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface { // URL returns the authentication URL for a given state value. URL(state string) string // Exchange converts an authorization code into an OAuth2 token. Exchange(code string) (*oauth2.Token, error) // CharacterInfo returns information on the authentication token's scopes // and the character that was authenticated. CharacterInfo(token *oauth2.Token) (*CharacterInfo, error) // GetClient returns an http.Client that uses the provided token to authenticate // and auto-refreshes as necessary. GetClient(token *oauth2.Token) *http.Client }
Authenticator provides an interface to EVE's OAuth2 interface.
func MakeAuthenticator ¶
func MakeAuthenticator(endpoint oauth2.Endpoint, clientID, clientSecret, redirectURL string, scopes ...string) Authenticator
MakeAuthenticator returns an Authenticator object for the given client and access point. The provided client configuration (secret, ID, and redirect URL) must be registered for anything to work.
Optionally, add one or more scopes to request.
Click to show internal directories.
Click to hide internal directories.