public class TokenClientImpl extends com.covisint.core.http.service.client.BaseResourceClient<Token> implements TokenClient
| Constructor and Description |
|---|
TokenClientImpl() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
add(Token resource,
org.apache.http.protocol.HttpContext httpContext) |
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
delete(String id,
org.apache.http.protocol.HttpContext httpContext) |
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
get(String id,
org.apache.http.protocol.HttpContext httpContext) |
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
get(Token resource,
org.apache.http.protocol.HttpContext httpContext) |
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
getToken(String clientId,
String clientSecret,
org.apache.http.protocol.HttpContext httpContext)
Generate token for client credentials.
|
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
getToken(String clientId,
String certificate,
String publickey,
String x509RequestAttributeName,
org.apache.http.protocol.HttpContext httpContext)
generate token for certificate.
|
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
persist(Token resource,
org.apache.http.protocol.HttpContext httpContext) |
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
postAccessToken(String clientId,
String clientSecret,
org.apache.http.protocol.HttpContext httpContext)
Generate token for client credentials via post.
|
com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> |
postAccessToken(String clientId,
String certificate,
String publickey,
String x509RequestAttributeName,
org.apache.http.protocol.HttpContext httpContext)
generate token for certificate via post.
|
com.google.common.util.concurrent.CheckedFuture<List<Token>,com.covisint.core.http.service.core.ServiceException> |
search(com.google.common.collect.Multimap<String,String> searchCriteria,
com.covisint.core.http.service.core.SortCriteria sortCriteria,
com.covisint.core.http.service.core.Page page,
org.apache.http.protocol.HttpContext httpContext) |
com.google.common.util.concurrent.CheckedFuture<List<Token>,com.covisint.core.http.service.core.ServiceException> |
search(com.google.common.collect.Multimap<String,String> searchCriteria,
com.covisint.core.http.service.core.SortCriteria sortCriteria,
com.covisint.core.http.service.core.Page page,
org.apache.http.protocol.HttpContext httpContext,
com.google.common.net.MediaType mediaType,
String searchResourcesEndPoint) |
void |
setApplicationId(String newAppId)
Sets the id of the application that will need to authorize calls with these tokens.
|
void |
setGetTokenUriTemplate(com.damnhandy.uri.template.UriTemplate uriTemplate)
Sets the URI template for the get token end point.
|
void |
setPostTokenUriTemplate(com.damnhandy.uri.template.UriTemplate uriTemplate)
Sets the URI template for the post token end point.
|
public void setGetTokenUriTemplate(com.damnhandy.uri.template.UriTemplate uriTemplate)
uriTemplate - The URI template for the get token end point.public void setPostTokenUriTemplate(com.damnhandy.uri.template.UriTemplate uriTemplate)
uriTemplate - The URI template for the post token end point.public void setApplicationId(@Nonnull@NotEmpty
String newAppId)
newAppId - The application id to set.@Nonnull public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> getToken(@Nonnull@NotEmpty String clientId, String clientSecret, @Nonnull org.apache.http.protocol.HttpContext httpContext)
getToken in interface TokenClientclientId - the client id.clientSecret - the client secret.httpContext - the http context.@Nonnull public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> postAccessToken(@Nonnull@NotEmpty String clientId, @Nonnull@NotEmpty String clientSecret, @Nonnull org.apache.http.protocol.HttpContext httpContext)
postAccessToken in interface TokenClientclientId - the client id.clientSecret - the client secret.httpContext - the http context.@Nonnull public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> getToken(@Nonnull@NotEmpty String clientId, @Nullable String certificate, @Nullable String publickey, @Nullable String x509RequestAttributeName, @Nonnull org.apache.http.protocol.HttpContext httpContext)
getToken in interface TokenClientclientId - the grant type id.certificate - the certificatepublickey - the public keyx509RequestAttributeName - the X509 request attribute NamehttpContext - httpContext the http context.@Nonnull public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> postAccessToken(@Nonnull@NotEmpty String clientId, @Nullable String certificate, @Nullable String publickey, @Nullable String x509RequestAttributeName, @Nonnull org.apache.http.protocol.HttpContext httpContext)
postAccessToken in interface TokenClientclientId - the grant type id.certificate - the certificatepublickey - the public keyx509RequestAttributeName - the X509 request attribute NamehttpContext - httpContext the http context.public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> add(Token resource, org.apache.http.protocol.HttpContext httpContext)
public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> delete(String id, org.apache.http.protocol.HttpContext httpContext)
public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> get(String id, org.apache.http.protocol.HttpContext httpContext)
public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> get(Token resource, org.apache.http.protocol.HttpContext httpContext)
public com.google.common.util.concurrent.CheckedFuture<Token,com.covisint.core.http.service.core.ServiceException> persist(Token resource, org.apache.http.protocol.HttpContext httpContext)
public com.google.common.util.concurrent.CheckedFuture<List<Token>,com.covisint.core.http.service.core.ServiceException> search(com.google.common.collect.Multimap<String,String> searchCriteria, com.covisint.core.http.service.core.SortCriteria sortCriteria, com.covisint.core.http.service.core.Page page, org.apache.http.protocol.HttpContext httpContext)
public com.google.common.util.concurrent.CheckedFuture<List<Token>,com.covisint.core.http.service.core.ServiceException> search(com.google.common.collect.Multimap<String,String> searchCriteria, com.covisint.core.http.service.core.SortCriteria sortCriteria, com.covisint.core.http.service.core.Page page, org.apache.http.protocol.HttpContext httpContext, com.google.common.net.MediaType mediaType, String searchResourcesEndPoint)
Copyright © 2015 Covisint. All rights reserved.