A corporation manager and dashboard for EVE Online
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
599 B

  1. # -*- coding: utf-8 -*-
  2. from urllib.parse import urlencode
  3. __all__ = ["SSOManager"]
  4. class SSOManager:
  5. def get_authorize_url(self, client_id, redirect_uri, scopes=None,
  6. state=None):
  7. baseurl = "https://login.eveonline.com/oauth/authorize?"
  8. params = {
  9. "response_type": "code",
  10. "redirect_uri": redirect_uri,
  11. "client_id": client_id
  12. }
  13. if scopes:
  14. params["scope"] = " ".join(scopes)
  15. if state is not None:
  16. params["state"] = state
  17. return baseurl + urlencode(params)