use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project cas by apereo.
the class OAuth20AccessTokenExpirationPolicy method isAccessTokenExpired.
/**
* Is access token expired ?
*
* @param ticketState the ticket state
* @return true/false
*/
@JsonIgnore
protected boolean isAccessTokenExpired(final Ticket ticketState) {
val currentSystemTime = ZonedDateTime.now(ZoneOffset.UTC);
val creationTime = ticketState.getCreationTime();
var expirationTime = creationTime.plus(this.maxTimeToLiveInSeconds, ChronoUnit.SECONDS);
if (currentSystemTime.isAfter(expirationTime)) {
LOGGER.debug("Access token is expired because the current time [{}] is after [{}]", currentSystemTime, expirationTime);
return true;
}
val expirationTimeToKill = ticketState.getLastTimeUsed().plus(this.timeToKillInSeconds, ChronoUnit.SECONDS);
if (currentSystemTime.isAfter(expirationTimeToKill)) {
LOGGER.debug("Access token is expired because the current time [{}] is after [{}]", currentSystemTime, expirationTimeToKill);
return true;
}
return false;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project cas by apereo.
the class BaseSamlRegisteredServiceAttributeReleasePolicy method determineServiceProviderMetadataFacade.
/**
* Determine service provider metadata facade.
*
* @param registeredService the registered service
* @param entityId the entity id
* @return the optional
*/
@JsonIgnore
protected static Optional<SamlRegisteredServiceServiceProviderMetadataFacade> determineServiceProviderMetadataFacade(final SamlRegisteredService registeredService, final String entityId) {
val applicationContext = ApplicationContextProvider.getApplicationContext();
val resolver = applicationContext.getBean(SamlRegisteredServiceCachingMetadataResolver.DEFAULT_BEAN_NAME, SamlRegisteredServiceCachingMetadataResolver.class);
return SamlRegisteredServiceServiceProviderMetadataFacade.get(resolver, registeredService, entityId);
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project cas by apereo.
the class DefaultAttributeDefinition method getScriptedAttributeValue.
@JsonIgnore
private List<Object> getScriptedAttributeValue(final String attributeKey, final List<Object> currentValues, final RegisteredService registeredService, final Map<String, List<Object>> attributes) {
LOGGER.trace("Locating attribute value via script for definition [{}]", this);
val matcherInline = ScriptingUtils.getMatcherForInlineGroovyScript(getScript());
if (matcherInline.find()) {
return fetchAttributeValueAsInlineGroovyScript(attributeKey, currentValues, matcherInline.group(1), registeredService, attributes);
}
val matcherFile = ScriptingUtils.getMatcherForExternalGroovyScript(getScript());
if (matcherFile.find()) {
return fetchAttributeValueFromExternalGroovyScript(attributeKey, currentValues, matcherFile.group(), registeredService, attributes);
}
return new ArrayList<>(0);
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project cas by apereo.
the class TicketGrantingTicketImpl method getChainedAuthentications.
@JsonIgnore
@Override
public List<Authentication> getChainedAuthentications() {
val list = new ArrayList<Authentication>(2);
list.add(getAuthentication());
if (this.getTicketGrantingTicket() == null) {
return list;
}
list.addAll(this.getTicketGrantingTicket().getChainedAuthentications());
return list;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project Gaffer by gchq.
the class AddNamedOperation method setOperationChain.
@JsonIgnore
public void setOperationChain(final OperationChain operationChain) {
try {
if (operationChain instanceof OperationChainDAO) {
this.operations = new String(JSONSerialiser.serialise(operationChain), Charset.forName(CHARSET_NAME));
} else {
final OperationChainDAO dao = new OperationChainDAO(operationChain.getOperations());
this.operations = new String(JSONSerialiser.serialise(dao), Charset.forName(CHARSET_NAME));
}
} catch (final SerialisationException se) {
throw new IllegalArgumentException(se.getMessage());
}
}
Aggregations