@Path(value="/ws/v1/cred") @Consumes(value="application/json") @Produces(value="application/json") public class CredentialWS extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEF_APP_PATH |
static String |
DEF_ESI_SERVER_PATH |
static String |
DEF_REAUTH_SUCCESS_FRAGMENT |
static String |
DEF_SITE_AGENT |
static long |
DEF_TEMP_TOKEN_LIFETIME |
static Logger |
log |
static String |
PROP_APP_PATH |
static String |
PROP_ESI_SERVER_PATH |
static String |
PROP_EVE_VERIFY_URL |
static String |
PROP_REAUTH_SUCCESS_FRAGMENT |
static String |
PROP_SITE_AGENT |
static String |
PROP_TEMP_TOKEN_LIFETIME |
static String |
PROP_TOKEN_EVE_CLIENT_ID |
static String |
PROP_TOKEN_EVE_SECRET_KEY |
| Constructor and Description |
|---|
CredentialWS() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
clearESICredential(javax.servlet.http.HttpServletRequest request,
long aid)
Clear the ESI credential from a synchronized account.
|
javax.ws.rs.core.Response |
clearXMLCredential(javax.servlet.http.HttpServletRequest request,
long aid)
Clear the XML credential from a synchronized account.
|
javax.ws.rs.core.Response |
esiCredentialCallback(javax.servlet.http.HttpServletRequest req)
Handle the second part of setting an ESI credential by accepting the OAuth callback.
|
protected static org.apache.http.client.utils.URIBuilder |
makeStandardBuilder()
Create a URI builder initialized with the main application URL.
|
protected static void |
processTokenCallback(javax.servlet.http.HttpServletRequest req,
String verifyURL,
String eveClientID,
String eveSecretKey)
Process the end of an OAuth flow to set an ESI credential.
|
javax.ws.rs.core.Response |
setESICredential(javax.servlet.http.HttpServletRequest request,
long aid,
String scopes)
Start the process to set an ESI credential.
|
javax.ws.rs.core.Response |
setXMLCredential(javax.servlet.http.HttpServletRequest request,
long aid,
int key,
long charID,
String vcode)
Set the XML API credential associated with a Synchronized EVE account.
|
protected static javax.ws.rs.core.Response |
startTokenFlow(javax.servlet.http.HttpServletRequest request,
enterprises.orbital.evekit.account.EveKitUserAccount user,
enterprises.orbital.evekit.account.SynchronizedEveAccount account,
String scopes)
Start new OAuth flow.
|
public static final Logger log
public static final String PROP_TOKEN_EVE_CLIENT_ID
public static final String PROP_TOKEN_EVE_SECRET_KEY
public static final String PROP_EVE_VERIFY_URL
public static final String PROP_ESI_SERVER_PATH
public static final String DEF_ESI_SERVER_PATH
public static final String PROP_APP_PATH
public static final String DEF_APP_PATH
public static final String PROP_TEMP_TOKEN_LIFETIME
public static final long DEF_TEMP_TOKEN_LIFETIME
public static final String PROP_REAUTH_SUCCESS_FRAGMENT
public static final String DEF_REAUTH_SUCCESS_FRAGMENT
public static final String PROP_SITE_AGENT
public static final String DEF_SITE_AGENT
protected static org.apache.http.client.utils.URIBuilder makeStandardBuilder()
protected static javax.ws.rs.core.Response startTokenFlow(javax.servlet.http.HttpServletRequest request,
enterprises.orbital.evekit.account.EveKitUserAccount user,
enterprises.orbital.evekit.account.SynchronizedEveAccount account,
String scopes)
throws IOException
request - incoming requestuser - authorizing useraccount - account which will store new ESI tokenscopes - requested scopesIOException - if an error occurs while starting the flowprotected static void processTokenCallback(javax.servlet.http.HttpServletRequest req,
String verifyURL,
String eveClientID,
String eveSecretKey)
throws enterprises.orbital.evekit.account.AccountUpdateException,
IOException
req - incoming OAuth callback requestverifyURL - EVE SSO verify URL to retrieve authorized character infoeveClientID - EVE SSO client IDeveSecretKey - EVE SSO secret keyenterprises.orbital.evekit.account.AccountUpdateException - if an inconsistent state would result from setting the credentialIOException - on any other error@Path(value="/cred_xml/{aid}")
@POST
public javax.ws.rs.core.Response setXMLCredential(@Context
javax.servlet.http.HttpServletRequest request,
@PathParam(value="aid")
long aid,
@QueryParam(value="key")
int key,
@QueryParam(value="charID")
long charID,
String vcode)
request - inbound requestaid - account IDcharID - character ID to be used with XML credentialskey - XML API access keyvcode - XML API access verificaation code@Path(value="/cred_esi/{aid}")
@POST
public javax.ws.rs.core.Response setESICredential(@Context
javax.servlet.http.HttpServletRequest request,
@PathParam(value="aid")
long aid,
String scopes)
request - incoming HTTP requestaid - account on which credential will be setscopes - request scopes@Path(value="/esi_callback")
@GET
public javax.ws.rs.core.Response esiCredentialCallback(@Context
javax.servlet.http.HttpServletRequest req)
req - incoming HTTP request@Path(value="/cred_xml/{aid}")
@DELETE
public javax.ws.rs.core.Response clearXMLCredential(@Context
javax.servlet.http.HttpServletRequest request,
@PathParam(value="aid")
long aid)
request - incoming HTTP requestaid - account to clear@Path(value="/cred_esi/{aid}")
@DELETE
public javax.ws.rs.core.Response clearESICredential(@Context
javax.servlet.http.HttpServletRequest request,
@PathParam(value="aid")
long aid)
request - incoming HTTP requestaid - account to clearCopyright © 2017 Orbital Enterprises. All rights reserved.