Class AccessTokenServiceImpl
- java.lang.Object
-
- org.apache.syncope.core.rest.cxf.service.AbstractService
-
- org.apache.syncope.core.rest.cxf.service.AccessTokenServiceImpl
-
- All Implemented Interfaces:
AccessTokenService
,JAXRSService
@Service public class AccessTokenServiceImpl extends AbstractService implements AccessTokenService
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessTokenLogic
logic
-
Fields inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
LOG, messageContext, OPTIONS_ALLOW, searchContext, uriInfo
-
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
-
Constructor Summary
Constructors Constructor Description AccessTokenServiceImpl(AccessTokenLogic logic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(String key)
Invalidates the access token matching the provided key.PagedResult<AccessTokenTO>
list(AccessTokenQuery query)
Returns a paged list of existing access tokens matching the given query.javax.ws.rs.core.Response
login()
Returns an empty response bearing the X-Syncope-Token header value, in case of successful authentication.void
logout()
Invalidates the access token of the requesting user.javax.ws.rs.core.Response
refresh()
Returns an empty response bearing the X-Syncope-Token header value, with extended lifetime.-
Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
applyPreference, buildPagedResult, checkETag, createResponse, findActualKey, getOrderByClauses, getPreference, isNullPriorityAsync, modificationResponse
-
-
-
-
Field Detail
-
logic
protected final AccessTokenLogic logic
-
-
Constructor Detail
-
AccessTokenServiceImpl
public AccessTokenServiceImpl(AccessTokenLogic logic)
-
-
Method Detail
-
login
public javax.ws.rs.core.Response login()
Description copied from interface:AccessTokenService
Returns an empty response bearing the X-Syncope-Token header value, in case of successful authentication. The provided value is a signed JSON Web Token.- Specified by:
login
in interfaceAccessTokenService
- Returns:
- empty response bearing the X-Syncope-Token header value, in case of successful authentication
-
refresh
public javax.ws.rs.core.Response refresh()
Description copied from interface:AccessTokenService
Returns an empty response bearing the X-Syncope-Token header value, with extended lifetime. The provided value is a signed JSON Web Token.- Specified by:
refresh
in interfaceAccessTokenService
- Returns:
- an empty response bearing the X-Syncope-Token header value, with extended lifetime
-
logout
public void logout()
Description copied from interface:AccessTokenService
Invalidates the access token of the requesting user.- Specified by:
logout
in interfaceAccessTokenService
-
list
public PagedResult<AccessTokenTO> list(AccessTokenQuery query)
Description copied from interface:AccessTokenService
Returns a paged list of existing access tokens matching the given query.- Specified by:
list
in interfaceAccessTokenService
- Parameters:
query
- query conditions- Returns:
- paged list of existing access tokens matching the given query
-
delete
public void delete(String key)
Description copied from interface:AccessTokenService
Invalidates the access token matching the provided key.- Specified by:
delete
in interfaceAccessTokenService
- Parameters:
key
- access token key
-
-