id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
126,300 | apereo/cas | support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java | AbstractServiceValidateController.validateServiceTicket | protected Assertion validateServiceTicket(final WebApplicationService service, final String serviceTicketId) {
return serviceValidateConfigurationContext.getCentralAuthenticationService().validateServiceTicket(serviceTicketId, service);
} | java | protected Assertion validateServiceTicket(final WebApplicationService service, final String serviceTicketId) {
return serviceValidateConfigurationContext.getCentralAuthenticationService().validateServiceTicket(serviceTicketId, service);
} | [
"protected",
"Assertion",
"validateServiceTicket",
"(",
"final",
"WebApplicationService",
"service",
",",
"final",
"String",
"serviceTicketId",
")",
"{",
"return",
"serviceValidateConfigurationContext",
".",
"getCentralAuthenticationService",
"(",
")",
".",
"validateServiceTi... | Validate service ticket assertion.
@param service the service
@param serviceTicketId the service ticket id
@return the assertion | [
"Validate",
"service",
"ticket",
"assertion",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java#L225-L227 |
126,301 | apereo/cas | support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java | AbstractServiceValidateController.validateAssertion | private boolean validateAssertion(final HttpServletRequest request, final String serviceTicketId, final Assertion assertion, final Service service) {
for (val spec : serviceValidateConfigurationContext.getValidationSpecifications()) {
spec.reset();
val binder = new ServletRequestDataBind... | java | private boolean validateAssertion(final HttpServletRequest request, final String serviceTicketId, final Assertion assertion, final Service service) {
for (val spec : serviceValidateConfigurationContext.getValidationSpecifications()) {
spec.reset();
val binder = new ServletRequestDataBind... | [
"private",
"boolean",
"validateAssertion",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"String",
"serviceTicketId",
",",
"final",
"Assertion",
"assertion",
",",
"final",
"Service",
"service",
")",
"{",
"for",
"(",
"val",
"spec",
":",
"serviceValid... | Validate assertion.
@param request the request
@param serviceTicketId the service ticket id
@param assertion the assertion
@param service the service
@return true/false | [
"Validate",
"assertion",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java#L242-L255 |
126,302 | apereo/cas | support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java | AbstractServiceValidateController.generateErrorView | private ModelAndView generateErrorView(final String code, final Object[] args, final HttpServletRequest request, final WebApplicationService service) {
val modelAndView = serviceValidateConfigurationContext.getValidationViewFactory().getModelAndView(request, false, service, getClass());
val convertedDes... | java | private ModelAndView generateErrorView(final String code, final Object[] args, final HttpServletRequest request, final WebApplicationService service) {
val modelAndView = serviceValidateConfigurationContext.getValidationViewFactory().getModelAndView(request, false, service, getClass());
val convertedDes... | [
"private",
"ModelAndView",
"generateErrorView",
"(",
"final",
"String",
"code",
",",
"final",
"Object",
"[",
"]",
"args",
",",
"final",
"HttpServletRequest",
"request",
",",
"final",
"WebApplicationService",
"service",
")",
"{",
"val",
"modelAndView",
"=",
"servic... | Generate error view.
@param code the code
@param args the args
@param request the request
@return the model and view | [
"Generate",
"error",
"view",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java#L275-L281 |
126,303 | apereo/cas | support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java | AbstractServiceValidateController.generateSuccessView | private ModelAndView generateSuccessView(final Assertion assertion, final String proxyIou,
final WebApplicationService service, final HttpServletRequest request,
final Optional<MultifactorAuthenticationProvider> contextProvider,
... | java | private ModelAndView generateSuccessView(final Assertion assertion, final String proxyIou,
final WebApplicationService service, final HttpServletRequest request,
final Optional<MultifactorAuthenticationProvider> contextProvider,
... | [
"private",
"ModelAndView",
"generateSuccessView",
"(",
"final",
"Assertion",
"assertion",
",",
"final",
"String",
"proxyIou",
",",
"final",
"WebApplicationService",
"service",
",",
"final",
"HttpServletRequest",
"request",
",",
"final",
"Optional",
"<",
"MultifactorAuth... | Generate the success view. The result will contain the assertion and the proxy iou.
@param assertion the assertion
@param proxyIou the proxy iou
@param service the validated service
@param contextProvider the context provider
@param proxyGrantingTicket the proxy granting ticket
@re... | [
"Generate",
"the",
"success",
"view",
".",
"The",
"result",
"will",
"contain",
"the",
"assertion",
"and",
"the",
"proxy",
"iou",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java#L294-L311 |
126,304 | apereo/cas | support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java | AbstractServiceValidateController.enforceTicketValidationAuthorizationFor | protected void enforceTicketValidationAuthorizationFor(final HttpServletRequest request, final Service service, final Assertion assertion) {
val authorizers = serviceValidateConfigurationContext.getValidationAuthorizers().getAuthorizers();
for (val a : authorizers) {
try {
a.... | java | protected void enforceTicketValidationAuthorizationFor(final HttpServletRequest request, final Service service, final Assertion assertion) {
val authorizers = serviceValidateConfigurationContext.getValidationAuthorizers().getAuthorizers();
for (val a : authorizers) {
try {
a.... | [
"protected",
"void",
"enforceTicketValidationAuthorizationFor",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"Service",
"service",
",",
"final",
"Assertion",
"assertion",
")",
"{",
"val",
"authorizers",
"=",
"serviceValidateConfigurationContext",
".",
"get... | Enforce ticket validation authorization for.
@param request the request
@param service the service
@param assertion the assertion | [
"Enforce",
"ticket",
"validation",
"authorization",
"for",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java#L320-L329 |
126,305 | apereo/cas | support/cas-server-support-couchbase-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/CouchbaseTicketRegistry.java | CouchbaseTicketRegistry.getTimeToLive | private static int getTimeToLive(final Ticket ticket) {
val expTime = ticket.getExpirationPolicy().getTimeToLive().intValue();
if (TimeUnit.SECONDS.toDays(expTime) >= MAX_EXP_TIME_IN_DAYS) {
LOGGER.warn("Any expiration time larger than [{}] days in seconds is considered absolute (as in a Uni... | java | private static int getTimeToLive(final Ticket ticket) {
val expTime = ticket.getExpirationPolicy().getTimeToLive().intValue();
if (TimeUnit.SECONDS.toDays(expTime) >= MAX_EXP_TIME_IN_DAYS) {
LOGGER.warn("Any expiration time larger than [{}] days in seconds is considered absolute (as in a Uni... | [
"private",
"static",
"int",
"getTimeToLive",
"(",
"final",
"Ticket",
"ticket",
")",
"{",
"val",
"expTime",
"=",
"ticket",
".",
"getExpirationPolicy",
"(",
")",
".",
"getTimeToLive",
"(",
")",
".",
"intValue",
"(",
")",
";",
"if",
"(",
"TimeUnit",
".",
"S... | Get the expiration policy value of the ticket in seconds.
@param ticket the ticket
@return the exp value
@see <a href="http://docs.couchbase.com/developer/java-2.0/documents-basics.html">Couchbase Docs</a> | [
"Get",
"the",
"expiration",
"policy",
"value",
"of",
"the",
"ticket",
"in",
"seconds",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-couchbase-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/CouchbaseTicketRegistry.java#L90-L98 |
126,306 | apereo/cas | core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractTicketRegistry.java | AbstractTicketRegistry.deleteChildren | protected int deleteChildren(final TicketGrantingTicket ticket) {
val count = new AtomicInteger(0);
val services = ticket.getServices();
if (services != null && !services.isEmpty()) {
services.keySet().forEach(ticketId -> {
if (deleteSingleTicket(ticketId)) {
... | java | protected int deleteChildren(final TicketGrantingTicket ticket) {
val count = new AtomicInteger(0);
val services = ticket.getServices();
if (services != null && !services.isEmpty()) {
services.keySet().forEach(ticketId -> {
if (deleteSingleTicket(ticketId)) {
... | [
"protected",
"int",
"deleteChildren",
"(",
"final",
"TicketGrantingTicket",
"ticket",
")",
"{",
"val",
"count",
"=",
"new",
"AtomicInteger",
"(",
"0",
")",
";",
"val",
"services",
"=",
"ticket",
".",
"getServices",
"(",
")",
";",
"if",
"(",
"services",
"!=... | Delete TGT's service tickets.
@param ticket the ticket
@return the count of tickets that were removed including child tickets and zero if the ticket was not deleted | [
"Delete",
"TGT",
"s",
"service",
"tickets",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractTicketRegistry.java#L168-L182 |
126,307 | apereo/cas | core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractTicketRegistry.java | AbstractTicketRegistry.encodeTicketId | protected String encodeTicketId(final String ticketId) {
if (!isCipherExecutorEnabled()) {
LOGGER.trace(MESSAGE);
return ticketId;
}
if (StringUtils.isBlank(ticketId)) {
return ticketId;
}
val encodedId = DigestUtils.sha512(ticketId);
L... | java | protected String encodeTicketId(final String ticketId) {
if (!isCipherExecutorEnabled()) {
LOGGER.trace(MESSAGE);
return ticketId;
}
if (StringUtils.isBlank(ticketId)) {
return ticketId;
}
val encodedId = DigestUtils.sha512(ticketId);
L... | [
"protected",
"String",
"encodeTicketId",
"(",
"final",
"String",
"ticketId",
")",
"{",
"if",
"(",
"!",
"isCipherExecutorEnabled",
"(",
")",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"MESSAGE",
")",
";",
"return",
"ticketId",
";",
"}",
"if",
"(",
"StringUtils"... | Encode ticket id into a SHA-512.
@param ticketId the ticket id
@return the ticket | [
"Encode",
"ticket",
"id",
"into",
"a",
"SHA",
"-",
"512",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractTicketRegistry.java#L198-L209 |
126,308 | apereo/cas | core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractTicketRegistry.java | AbstractTicketRegistry.encodeTicket | @SneakyThrows
protected Ticket encodeTicket(final Ticket ticket) {
if (!isCipherExecutorEnabled()) {
LOGGER.trace(MESSAGE);
return ticket;
}
if (ticket == null) {
LOGGER.debug("Ticket passed is null and cannot be encoded");
return null;
... | java | @SneakyThrows
protected Ticket encodeTicket(final Ticket ticket) {
if (!isCipherExecutorEnabled()) {
LOGGER.trace(MESSAGE);
return ticket;
}
if (ticket == null) {
LOGGER.debug("Ticket passed is null and cannot be encoded");
return null;
... | [
"@",
"SneakyThrows",
"protected",
"Ticket",
"encodeTicket",
"(",
"final",
"Ticket",
"ticket",
")",
"{",
"if",
"(",
"!",
"isCipherExecutorEnabled",
"(",
")",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"MESSAGE",
")",
";",
"return",
"ticket",
";",
"}",
"if",
"... | Encode ticket.
@param ticket the ticket
@return the ticket | [
"Encode",
"ticket",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractTicketRegistry.java#L217-L233 |
126,309 | apereo/cas | core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractTicketRegistry.java | AbstractTicketRegistry.decodeTicket | @SneakyThrows
protected Ticket decodeTicket(final Ticket result) {
if (!isCipherExecutorEnabled()) {
LOGGER.trace(MESSAGE);
return result;
}
if (result == null) {
LOGGER.warn("Ticket passed is null and cannot be decoded");
return null;
... | java | @SneakyThrows
protected Ticket decodeTicket(final Ticket result) {
if (!isCipherExecutorEnabled()) {
LOGGER.trace(MESSAGE);
return result;
}
if (result == null) {
LOGGER.warn("Ticket passed is null and cannot be decoded");
return null;
... | [
"@",
"SneakyThrows",
"protected",
"Ticket",
"decodeTicket",
"(",
"final",
"Ticket",
"result",
")",
"{",
"if",
"(",
"!",
"isCipherExecutorEnabled",
"(",
")",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"MESSAGE",
")",
";",
"return",
"result",
";",
"}",
"if",
"... | Decode ticket.
@param result the result
@return the ticket | [
"Decode",
"ticket",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractTicketRegistry.java#L241-L260 |
126,310 | apereo/cas | core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/DefaultPrincipalElectionStrategy.java | DefaultPrincipalElectionStrategy.getPrincipalAttributesForPrincipal | protected Map<String, List<Object>> getPrincipalAttributesForPrincipal(final Principal principal, final Map<String, List<Object>> principalAttributes) {
return principalAttributes;
} | java | protected Map<String, List<Object>> getPrincipalAttributesForPrincipal(final Principal principal, final Map<String, List<Object>> principalAttributes) {
return principalAttributes;
} | [
"protected",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"getPrincipalAttributesForPrincipal",
"(",
"final",
"Principal",
"principal",
",",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"principalAttributes",
")",
"{",
... | Gets principal attributes for principal.
@param principal the principal
@param principalAttributes the principal attributes
@return the principal attributes for principal | [
"Gets",
"principal",
"attributes",
"for",
"principal",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/DefaultPrincipalElectionStrategy.java#L51-L53 |
126,311 | apereo/cas | core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/DefaultCasConfigurationPropertiesSourceLocator.java | DefaultCasConfigurationPropertiesSourceLocator.scanForConfigurationResources | private List<Resource> scanForConfigurationResources(final File config, final List<String> profiles) {
val possibleFiles = getAllPossibleExternalConfigDirFilenames(config, profiles);
return possibleFiles.stream()
.filter(File::exists)
.filter(File::isFile)
.map(FileSy... | java | private List<Resource> scanForConfigurationResources(final File config, final List<String> profiles) {
val possibleFiles = getAllPossibleExternalConfigDirFilenames(config, profiles);
return possibleFiles.stream()
.filter(File::exists)
.filter(File::isFile)
.map(FileSy... | [
"private",
"List",
"<",
"Resource",
">",
"scanForConfigurationResources",
"(",
"final",
"File",
"config",
",",
"final",
"List",
"<",
"String",
">",
"profiles",
")",
"{",
"val",
"possibleFiles",
"=",
"getAllPossibleExternalConfigDirFilenames",
"(",
"config",
",",
"... | Get all possible configuration files for config directory that actually exist as files.
@param config Folder in which to look for files
@param profiles Profiles that are active
@return List of files to be processed in order where last one processed overrides others | [
"Get",
"all",
"possible",
"configuration",
"files",
"for",
"config",
"directory",
"that",
"actually",
"exist",
"as",
"files",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/DefaultCasConfigurationPropertiesSourceLocator.java#L120-L127 |
126,312 | apereo/cas | core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/DefaultCasConfigurationPropertiesSourceLocator.java | DefaultCasConfigurationPropertiesSourceLocator.loadSettingsByApplicationProfiles | private PropertySource<?> loadSettingsByApplicationProfiles(final Environment environment, final File config) {
val profiles = ConfigurationPropertiesLoaderFactory.getApplicationProfiles(environment);
val resources = scanForConfigurationResources(config, profiles);
val composite = new CompositeP... | java | private PropertySource<?> loadSettingsByApplicationProfiles(final Environment environment, final File config) {
val profiles = ConfigurationPropertiesLoaderFactory.getApplicationProfiles(environment);
val resources = scanForConfigurationResources(config, profiles);
val composite = new CompositeP... | [
"private",
"PropertySource",
"<",
"?",
">",
"loadSettingsByApplicationProfiles",
"(",
"final",
"Environment",
"environment",
",",
"final",
"File",
"config",
")",
"{",
"val",
"profiles",
"=",
"ConfigurationPropertiesLoaderFactory",
".",
"getApplicationProfiles",
"(",
"en... | Property files processed in order of non-profiles first and then profiles, and profiles are first to last
with properties in the last profile overriding properties in previous profiles or non-profiles.
@param environment Spring environment
@param config Location of config files
@return Merged properties | [
"Property",
"files",
"processed",
"in",
"order",
"of",
"non",
"-",
"profiles",
"first",
"and",
"then",
"profiles",
"and",
"profiles",
"are",
"first",
"to",
"last",
"with",
"properties",
"in",
"the",
"last",
"profile",
"overriding",
"properties",
"in",
"previou... | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/DefaultCasConfigurationPropertiesSourceLocator.java#L137-L149 |
126,313 | apereo/cas | core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java | RegisteredServiceMappedRegexAttributeFilter.handleUnmappedAttribute | protected void handleUnmappedAttribute(final Map<String, List<Object>> attributesToRelease, final String attributeName, final Object attributeValue) {
LOGGER.debug("Found attribute [{}] that is not defined in pattern definitions", attributeName);
if (excludeUnmappedAttributes) {
LOGGER.debug... | java | protected void handleUnmappedAttribute(final Map<String, List<Object>> attributesToRelease, final String attributeName, final Object attributeValue) {
LOGGER.debug("Found attribute [{}] that is not defined in pattern definitions", attributeName);
if (excludeUnmappedAttributes) {
LOGGER.debug... | [
"protected",
"void",
"handleUnmappedAttribute",
"(",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"attributesToRelease",
",",
"final",
"String",
"attributeName",
",",
"final",
"Object",
"attributeValue",
")",
"{",
"LOGGER",
".",
"debug",
... | Handle unmapped attribute.
@param attributesToRelease the attributes to release
@param attributeName the attribute name
@param attributeValue the attribute value | [
"Handle",
"unmapped",
"attribute",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java#L92-L100 |
126,314 | apereo/cas | core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java | RegisteredServiceMappedRegexAttributeFilter.createPatternForMappedAttribute | protected Collection<Pattern> createPatternForMappedAttribute(final String attributeName) {
val matchingPattern = patterns.get(attributeName).toString();
val pattern = RegexUtils.createPattern(matchingPattern, this.caseInsensitive ? Pattern.CASE_INSENSITIVE : 0);
LOGGER.debug("Created pattern fo... | java | protected Collection<Pattern> createPatternForMappedAttribute(final String attributeName) {
val matchingPattern = patterns.get(attributeName).toString();
val pattern = RegexUtils.createPattern(matchingPattern, this.caseInsensitive ? Pattern.CASE_INSENSITIVE : 0);
LOGGER.debug("Created pattern fo... | [
"protected",
"Collection",
"<",
"Pattern",
">",
"createPatternForMappedAttribute",
"(",
"final",
"String",
"attributeName",
")",
"{",
"val",
"matchingPattern",
"=",
"patterns",
".",
"get",
"(",
"attributeName",
")",
".",
"toString",
"(",
")",
";",
"val",
"patter... | Create pattern for mapped attribute pattern.
@param attributeName the attribute name
@return the pattern | [
"Create",
"pattern",
"for",
"mapped",
"attribute",
"pattern",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java#L108-L113 |
126,315 | apereo/cas | core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java | RegisteredServiceMappedRegexAttributeFilter.collectAttributeWithFilteredValues | protected void collectAttributeWithFilteredValues(final Map<String, List<Object>> attributesToRelease, final String attributeName,
final List<Object> filteredValues) {
attributesToRelease.put(attributeName, filteredValues);
} | java | protected void collectAttributeWithFilteredValues(final Map<String, List<Object>> attributesToRelease, final String attributeName,
final List<Object> filteredValues) {
attributesToRelease.put(attributeName, filteredValues);
} | [
"protected",
"void",
"collectAttributeWithFilteredValues",
"(",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"attributesToRelease",
",",
"final",
"String",
"attributeName",
",",
"final",
"List",
"<",
"Object",
">",
"filteredValues",
")",
... | Collect attribute with filtered values.
@param attributesToRelease the attributes to release
@param attributeName the attribute name
@param filteredValues the filtered values | [
"Collect",
"attribute",
"with",
"filtered",
"values",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java#L122-L125 |
126,316 | apereo/cas | core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java | RegisteredServiceMappedRegexAttributeFilter.filterProvidedGivenAttributes | protected Predicate<Map.Entry<String, List<Object>>> filterProvidedGivenAttributes() {
return entry -> {
val attributeName = entry.getKey();
val attributeValue = entry.getValue();
LOGGER.debug("Received attribute [{}] with value(s) [{}]", attributeName, attributeValue);
... | java | protected Predicate<Map.Entry<String, List<Object>>> filterProvidedGivenAttributes() {
return entry -> {
val attributeName = entry.getKey();
val attributeValue = entry.getValue();
LOGGER.debug("Received attribute [{}] with value(s) [{}]", attributeName, attributeValue);
... | [
"protected",
"Predicate",
"<",
"Map",
".",
"Entry",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
">",
"filterProvidedGivenAttributes",
"(",
")",
"{",
"return",
"entry",
"->",
"{",
"val",
"attributeName",
"=",
"entry",
".",
"getKey",
"(",
")",
";"... | Filter provided given attributes predicate.
@return the predicate | [
"Filter",
"provided",
"given",
"attributes",
"predicate",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java#L132-L139 |
126,317 | apereo/cas | core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java | RegisteredServiceMappedRegexAttributeFilter.filterAttributeValuesByPattern | protected List<Object> filterAttributeValuesByPattern(final Set<Object> attributeValues, final Pattern pattern) {
return attributeValues.stream().filter(v -> RegexUtils.matches(pattern, v.toString(), completeMatch)).collect(Collectors.toList());
} | java | protected List<Object> filterAttributeValuesByPattern(final Set<Object> attributeValues, final Pattern pattern) {
return attributeValues.stream().filter(v -> RegexUtils.matches(pattern, v.toString(), completeMatch)).collect(Collectors.toList());
} | [
"protected",
"List",
"<",
"Object",
">",
"filterAttributeValuesByPattern",
"(",
"final",
"Set",
"<",
"Object",
">",
"attributeValues",
",",
"final",
"Pattern",
"pattern",
")",
"{",
"return",
"attributeValues",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"v",
... | Filter attribute values by pattern and return the list.
@param attributeValues the attribute values
@param pattern the pattern
@return the list | [
"Filter",
"attribute",
"values",
"by",
"pattern",
"and",
"return",
"the",
"list",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/support/RegisteredServiceMappedRegexAttributeFilter.java#L148-L150 |
126,318 | apereo/cas | support/cas-server-support-dynamodb-core/src/main/java/org/apereo/cas/dynamodb/AmazonDynamoDbClientFactory.java | AmazonDynamoDbClientFactory.createAmazonDynamoDb | @SneakyThrows
public AmazonDynamoDB createAmazonDynamoDb(final AbstractDynamoDbProperties props) {
if (props.isLocalInstance()) {
LOGGER.debug("Creating DynamoDb standard client with endpoint [{}] and region [{}]",
props.getEndpoint(), props.getRegion());
val endpoint... | java | @SneakyThrows
public AmazonDynamoDB createAmazonDynamoDb(final AbstractDynamoDbProperties props) {
if (props.isLocalInstance()) {
LOGGER.debug("Creating DynamoDb standard client with endpoint [{}] and region [{}]",
props.getEndpoint(), props.getRegion());
val endpoint... | [
"@",
"SneakyThrows",
"public",
"AmazonDynamoDB",
"createAmazonDynamoDb",
"(",
"final",
"AbstractDynamoDbProperties",
"props",
")",
"{",
"if",
"(",
"props",
".",
"isLocalInstance",
"(",
")",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Creating DynamoDb standard client wi... | Create amazon dynamo db instance.
@param props the dynamo db properties
@return the amazon dynamo db | [
"Create",
"amazon",
"dynamo",
"db",
"instance",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-dynamodb-core/src/main/java/org/apereo/cas/dynamodb/AmazonDynamoDbClientFactory.java#L30-L66 |
126,319 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.writeError | public static ModelAndView writeError(final HttpServletResponse response, final String error) {
val model = CollectionUtils.wrap(OAuth20Constants.ERROR, error);
val mv = new ModelAndView(new MappingJackson2JsonView(MAPPER), (Map) model);
mv.setStatus(HttpStatus.BAD_REQUEST);
response.set... | java | public static ModelAndView writeError(final HttpServletResponse response, final String error) {
val model = CollectionUtils.wrap(OAuth20Constants.ERROR, error);
val mv = new ModelAndView(new MappingJackson2JsonView(MAPPER), (Map) model);
mv.setStatus(HttpStatus.BAD_REQUEST);
response.set... | [
"public",
"static",
"ModelAndView",
"writeError",
"(",
"final",
"HttpServletResponse",
"response",
",",
"final",
"String",
"error",
")",
"{",
"val",
"model",
"=",
"CollectionUtils",
".",
"wrap",
"(",
"OAuth20Constants",
".",
"ERROR",
",",
"error",
")",
";",
"v... | Write to the output this error.
@param response the response
@param error error message
@return json -backed view. | [
"Write",
"to",
"the",
"output",
"this",
"error",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L61-L67 |
126,320 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.getRegisteredOAuthServiceByRedirectUri | public static OAuthRegisteredService getRegisteredOAuthServiceByRedirectUri(final ServicesManager servicesManager, final String redirectUri) {
return getRegisteredOAuthServiceByPredicate(servicesManager, s -> s.matches(redirectUri));
} | java | public static OAuthRegisteredService getRegisteredOAuthServiceByRedirectUri(final ServicesManager servicesManager, final String redirectUri) {
return getRegisteredOAuthServiceByPredicate(servicesManager, s -> s.matches(redirectUri));
} | [
"public",
"static",
"OAuthRegisteredService",
"getRegisteredOAuthServiceByRedirectUri",
"(",
"final",
"ServicesManager",
"servicesManager",
",",
"final",
"String",
"redirectUri",
")",
"{",
"return",
"getRegisteredOAuthServiceByPredicate",
"(",
"servicesManager",
",",
"s",
"->... | Gets registered oauth service by redirect uri.
@param servicesManager the services manager
@param redirectUri the redirect uri
@return the registered OAuth service by redirect uri | [
"Gets",
"registered",
"oauth",
"service",
"by",
"redirect",
"uri",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L87-L89 |
126,321 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.getRequestParameters | public static Map<String, Object> getRequestParameters(final Collection<String> attributes, final HttpServletRequest context) {
return attributes.stream()
.filter(a -> StringUtils.isNotBlank(context.getParameter(a)))
.map(m -> {
val values = context.getParameterValues(m);... | java | public static Map<String, Object> getRequestParameters(final Collection<String> attributes, final HttpServletRequest context) {
return attributes.stream()
.filter(a -> StringUtils.isNotBlank(context.getParameter(a)))
.map(m -> {
val values = context.getParameterValues(m);... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"getRequestParameters",
"(",
"final",
"Collection",
"<",
"String",
">",
"attributes",
",",
"final",
"HttpServletRequest",
"context",
")",
"{",
"return",
"attributes",
".",
"stream",
"(",
")",
".",
... | Gets attributes.
@param attributes the attributes
@param context the context
@return the attributes | [
"Gets",
"attributes",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L111-L123 |
126,322 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.getRequestedScopes | public static Collection<String> getRequestedScopes(final HttpServletRequest context) {
val map = getRequestParameters(CollectionUtils.wrap(OAuth20Constants.SCOPE), context);
if (map == null || map.isEmpty()) {
return new ArrayList<>(0);
}
return (Collection<String>) map.get(... | java | public static Collection<String> getRequestedScopes(final HttpServletRequest context) {
val map = getRequestParameters(CollectionUtils.wrap(OAuth20Constants.SCOPE), context);
if (map == null || map.isEmpty()) {
return new ArrayList<>(0);
}
return (Collection<String>) map.get(... | [
"public",
"static",
"Collection",
"<",
"String",
">",
"getRequestedScopes",
"(",
"final",
"HttpServletRequest",
"context",
")",
"{",
"val",
"map",
"=",
"getRequestParameters",
"(",
"CollectionUtils",
".",
"wrap",
"(",
"OAuth20Constants",
".",
"SCOPE",
")",
",",
... | Gets requested scopes.
@param context the context
@return the requested scopes | [
"Gets",
"requested",
"scopes",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L141-L147 |
126,323 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.casOAuthCallbackUrl | public static String casOAuthCallbackUrl(final String serverPrefixUrl) {
return serverPrefixUrl.concat(OAuth20Constants.BASE_OAUTH20_URL + '/' + OAuth20Constants.CALLBACK_AUTHORIZE_URL);
} | java | public static String casOAuthCallbackUrl(final String serverPrefixUrl) {
return serverPrefixUrl.concat(OAuth20Constants.BASE_OAUTH20_URL + '/' + OAuth20Constants.CALLBACK_AUTHORIZE_URL);
} | [
"public",
"static",
"String",
"casOAuthCallbackUrl",
"(",
"final",
"String",
"serverPrefixUrl",
")",
"{",
"return",
"serverPrefixUrl",
".",
"concat",
"(",
"OAuth20Constants",
".",
"BASE_OAUTH20_URL",
"+",
"'",
"'",
"+",
"OAuth20Constants",
".",
"CALLBACK_AUTHORIZE_URL... | CAS oauth callback url.
@param serverPrefixUrl the server prefix url
@return the string | [
"CAS",
"oauth",
"callback",
"url",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L174-L176 |
126,324 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.isResponseModeTypeFormPost | public static boolean isResponseModeTypeFormPost(final OAuthRegisteredService registeredService, final OAuth20ResponseModeTypes responseType) {
return responseType == OAuth20ResponseModeTypes.FORM_POST || StringUtils.equalsIgnoreCase("post", registeredService.getResponseType());
} | java | public static boolean isResponseModeTypeFormPost(final OAuthRegisteredService registeredService, final OAuth20ResponseModeTypes responseType) {
return responseType == OAuth20ResponseModeTypes.FORM_POST || StringUtils.equalsIgnoreCase("post", registeredService.getResponseType());
} | [
"public",
"static",
"boolean",
"isResponseModeTypeFormPost",
"(",
"final",
"OAuthRegisteredService",
"registeredService",
",",
"final",
"OAuth20ResponseModeTypes",
"responseType",
")",
"{",
"return",
"responseType",
"==",
"OAuth20ResponseModeTypes",
".",
"FORM_POST",
"||",
... | Is response mode type form post?
@param registeredService the registered service
@param responseType the response type
@return the boolean | [
"Is",
"response",
"mode",
"type",
"form",
"post?"
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L196-L198 |
126,325 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.getResponseType | public static OAuth20ResponseTypes getResponseType(final J2EContext context) {
val responseType = context.getRequestParameter(OAuth20Constants.RESPONSE_TYPE);
val type = Arrays.stream(OAuth20ResponseTypes.values())
.filter(t -> t.getType().equalsIgnoreCase(responseType))
.findFir... | java | public static OAuth20ResponseTypes getResponseType(final J2EContext context) {
val responseType = context.getRequestParameter(OAuth20Constants.RESPONSE_TYPE);
val type = Arrays.stream(OAuth20ResponseTypes.values())
.filter(t -> t.getType().equalsIgnoreCase(responseType))
.findFir... | [
"public",
"static",
"OAuth20ResponseTypes",
"getResponseType",
"(",
"final",
"J2EContext",
"context",
")",
"{",
"val",
"responseType",
"=",
"context",
".",
"getRequestParameter",
"(",
"OAuth20Constants",
".",
"RESPONSE_TYPE",
")",
";",
"val",
"type",
"=",
"Arrays",
... | Gets response type.
@param context the context
@return the response type | [
"Gets",
"response",
"type",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L206-L214 |
126,326 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.getResponseModeType | public static OAuth20ResponseModeTypes getResponseModeType(final J2EContext context) {
val responseType = context.getRequestParameter(OAuth20Constants.RESPONSE_MODE);
val type = Arrays.stream(OAuth20ResponseModeTypes.values())
.filter(t -> t.getType().equalsIgnoreCase(responseType))
... | java | public static OAuth20ResponseModeTypes getResponseModeType(final J2EContext context) {
val responseType = context.getRequestParameter(OAuth20Constants.RESPONSE_MODE);
val type = Arrays.stream(OAuth20ResponseModeTypes.values())
.filter(t -> t.getType().equalsIgnoreCase(responseType))
... | [
"public",
"static",
"OAuth20ResponseModeTypes",
"getResponseModeType",
"(",
"final",
"J2EContext",
"context",
")",
"{",
"val",
"responseType",
"=",
"context",
".",
"getRequestParameter",
"(",
"OAuth20Constants",
".",
"RESPONSE_MODE",
")",
";",
"val",
"type",
"=",
"A... | Gets response mode type.
@param context the context
@return the response type | [
"Gets",
"response",
"mode",
"type",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L222-L230 |
126,327 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.isAuthorizedResponseTypeForService | public static boolean isAuthorizedResponseTypeForService(final J2EContext context, final OAuthRegisteredService registeredService) {
val responseType = context.getRequestParameter(OAuth20Constants.RESPONSE_TYPE);
if (registeredService.getSupportedResponseTypes() != null && !registeredService.getSupporte... | java | public static boolean isAuthorizedResponseTypeForService(final J2EContext context, final OAuthRegisteredService registeredService) {
val responseType = context.getRequestParameter(OAuth20Constants.RESPONSE_TYPE);
if (registeredService.getSupportedResponseTypes() != null && !registeredService.getSupporte... | [
"public",
"static",
"boolean",
"isAuthorizedResponseTypeForService",
"(",
"final",
"J2EContext",
"context",
",",
"final",
"OAuthRegisteredService",
"registeredService",
")",
"{",
"val",
"responseType",
"=",
"context",
".",
"getRequestParameter",
"(",
"OAuth20Constants",
"... | Is authorized response type for service?
@param context the context
@param registeredService the registered service
@return the boolean | [
"Is",
"authorized",
"response",
"type",
"for",
"service?"
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L272-L283 |
126,328 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.parseRequestScopes | public static Set<String> parseRequestScopes(final HttpServletRequest context) {
val parameterValues = context.getParameter(OAuth20Constants.SCOPE);
if (StringUtils.isBlank(parameterValues)) {
return new HashSet<>(0);
}
return CollectionUtils.wrapSet(parameterValues.split(" "... | java | public static Set<String> parseRequestScopes(final HttpServletRequest context) {
val parameterValues = context.getParameter(OAuth20Constants.SCOPE);
if (StringUtils.isBlank(parameterValues)) {
return new HashSet<>(0);
}
return CollectionUtils.wrapSet(parameterValues.split(" "... | [
"public",
"static",
"Set",
"<",
"String",
">",
"parseRequestScopes",
"(",
"final",
"HttpServletRequest",
"context",
")",
"{",
"val",
"parameterValues",
"=",
"context",
".",
"getParameter",
"(",
"OAuth20Constants",
".",
"SCOPE",
")",
";",
"if",
"(",
"StringUtils"... | Parse request scopes set.
@param context the context
@return the set | [
"Parse",
"request",
"scopes",
"set",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L334-L340 |
126,329 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.getServiceRequestHeaderIfAny | public static String getServiceRequestHeaderIfAny(final HttpServletRequest context) {
if (context == null) {
return null;
}
var id = context.getHeader(CasProtocolConstants.PARAMETER_SERVICE);
if (StringUtils.isBlank(id)) {
id = context.getHeader("X-".concat(CasPro... | java | public static String getServiceRequestHeaderIfAny(final HttpServletRequest context) {
if (context == null) {
return null;
}
var id = context.getHeader(CasProtocolConstants.PARAMETER_SERVICE);
if (StringUtils.isBlank(id)) {
id = context.getHeader("X-".concat(CasPro... | [
"public",
"static",
"String",
"getServiceRequestHeaderIfAny",
"(",
"final",
"HttpServletRequest",
"context",
")",
"{",
"if",
"(",
"context",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"var",
"id",
"=",
"context",
".",
"getHeader",
"(",
"CasProtocolCon... | Gets service request header if any.
@param context the context
@return the service request header if any | [
"Gets",
"service",
"request",
"header",
"if",
"any",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L348-L357 |
126,330 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.checkCallbackValid | public static boolean checkCallbackValid(final @NonNull RegisteredService registeredService, final String redirectUri) {
val registeredServiceId = registeredService.getServiceId();
LOGGER.debug("Found: [{}] vs redirectUri: [{}]", registeredService, redirectUri);
if (!redirectUri.matches(register... | java | public static boolean checkCallbackValid(final @NonNull RegisteredService registeredService, final String redirectUri) {
val registeredServiceId = registeredService.getServiceId();
LOGGER.debug("Found: [{}] vs redirectUri: [{}]", registeredService, redirectUri);
if (!redirectUri.matches(register... | [
"public",
"static",
"boolean",
"checkCallbackValid",
"(",
"final",
"@",
"NonNull",
"RegisteredService",
"registeredService",
",",
"final",
"String",
"redirectUri",
")",
"{",
"val",
"registeredServiceId",
"=",
"registeredService",
".",
"getServiceId",
"(",
")",
";",
... | Check if the callback url is valid.
@param registeredService the registered service
@param redirectUri the callback url
@return whether the callback url is valid | [
"Check",
"if",
"the",
"callback",
"url",
"is",
"valid",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L366-L377 |
126,331 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.checkClientSecret | public static boolean checkClientSecret(final OAuthRegisteredService registeredService, final String clientSecret) {
LOGGER.debug("Found: [{}] in secret check", registeredService);
if (StringUtils.isBlank(registeredService.getClientSecret())) {
LOGGER.debug("The client secret is not defined ... | java | public static boolean checkClientSecret(final OAuthRegisteredService registeredService, final String clientSecret) {
LOGGER.debug("Found: [{}] in secret check", registeredService);
if (StringUtils.isBlank(registeredService.getClientSecret())) {
LOGGER.debug("The client secret is not defined ... | [
"public",
"static",
"boolean",
"checkClientSecret",
"(",
"final",
"OAuthRegisteredService",
"registeredService",
",",
"final",
"String",
"clientSecret",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Found: [{}] in secret check\"",
",",
"registeredService",
")",
";",
"if",
... | Check the client secret.
@param registeredService the registered service
@param clientSecret the client secret
@return whether the secret is valid | [
"Check",
"the",
"client",
"secret",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L386-L397 |
126,332 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.checkResponseTypes | public static boolean checkResponseTypes(final String type, final OAuth20ResponseTypes... expectedTypes) {
LOGGER.debug("Response type: [{}]", type);
val checked = Stream.of(expectedTypes).anyMatch(t -> OAuth20Utils.isResponseType(type, t));
if (!checked) {
LOGGER.error("Unsupported ... | java | public static boolean checkResponseTypes(final String type, final OAuth20ResponseTypes... expectedTypes) {
LOGGER.debug("Response type: [{}]", type);
val checked = Stream.of(expectedTypes).anyMatch(t -> OAuth20Utils.isResponseType(type, t));
if (!checked) {
LOGGER.error("Unsupported ... | [
"public",
"static",
"boolean",
"checkResponseTypes",
"(",
"final",
"String",
"type",
",",
"final",
"OAuth20ResponseTypes",
"...",
"expectedTypes",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Response type: [{}]\"",
",",
"type",
")",
";",
"val",
"checked",
"=",
"St... | Check the response type against expected response types.
@param type the current response type
@param expectedTypes the expected response types
@return whether the response type is supported | [
"Check",
"the",
"response",
"type",
"against",
"expected",
"response",
"types",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L406-L413 |
126,333 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.getClientIdFromAuthenticatedProfile | public static String getClientIdFromAuthenticatedProfile(final CommonProfile profile) {
if (profile.containsAttribute(OAuth20Constants.CLIENT_ID)) {
val attribute = profile.getAttribute(OAuth20Constants.CLIENT_ID);
return CollectionUtils.toCollection(attribute, ArrayList.class).get(0).to... | java | public static String getClientIdFromAuthenticatedProfile(final CommonProfile profile) {
if (profile.containsAttribute(OAuth20Constants.CLIENT_ID)) {
val attribute = profile.getAttribute(OAuth20Constants.CLIENT_ID);
return CollectionUtils.toCollection(attribute, ArrayList.class).get(0).to... | [
"public",
"static",
"String",
"getClientIdFromAuthenticatedProfile",
"(",
"final",
"CommonProfile",
"profile",
")",
"{",
"if",
"(",
"profile",
".",
"containsAttribute",
"(",
"OAuth20Constants",
".",
"CLIENT_ID",
")",
")",
"{",
"val",
"attribute",
"=",
"profile",
"... | Gets client id from authenticated profile.
@param profile the profile
@return the client id from authenticated profile | [
"Gets",
"client",
"id",
"from",
"authenticated",
"profile",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L421-L427 |
126,334 | apereo/cas | support/cas-server-support-ws-idp/src/main/java/org/apereo/cas/ws/idp/web/WSFederationRequest.java | WSFederationRequest.of | public static WSFederationRequest of(final HttpServletRequest request) {
val wtrealm = request.getParameter(WSFederationConstants.WTREALM);
val wreply = request.getParameter(WSFederationConstants.WREPLY);
val wreq = request.getParameter(WSFederationConstants.WREQ);
val wctx = request.get... | java | public static WSFederationRequest of(final HttpServletRequest request) {
val wtrealm = request.getParameter(WSFederationConstants.WTREALM);
val wreply = request.getParameter(WSFederationConstants.WREPLY);
val wreq = request.getParameter(WSFederationConstants.WREQ);
val wctx = request.get... | [
"public",
"static",
"WSFederationRequest",
"of",
"(",
"final",
"HttpServletRequest",
"request",
")",
"{",
"val",
"wtrealm",
"=",
"request",
".",
"getParameter",
"(",
"WSFederationConstants",
".",
"WTREALM",
")",
";",
"val",
"wreply",
"=",
"request",
".",
"getPar... | Create federation request.
@param request the request
@return the federation request | [
"Create",
"federation",
"request",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ws-idp/src/main/java/org/apereo/cas/ws/idp/web/WSFederationRequest.java#L58-L74 |
126,335 | apereo/cas | support/cas-server-support-redis-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/RedisTicketRegistry.java | RedisTicketRegistry.getKeysStream | private Stream<String> getKeysStream() {
val cursor = client.getConnectionFactory().getConnection()
.scan(ScanOptions.scanOptions().match(getPatternTicketRedisKey())
.count(SCAN_COUNT)
.build());
return StreamSupport
.stream(Spliterators.splite... | java | private Stream<String> getKeysStream() {
val cursor = client.getConnectionFactory().getConnection()
.scan(ScanOptions.scanOptions().match(getPatternTicketRedisKey())
.count(SCAN_COUNT)
.build());
return StreamSupport
.stream(Spliterators.splite... | [
"private",
"Stream",
"<",
"String",
">",
"getKeysStream",
"(",
")",
"{",
"val",
"cursor",
"=",
"client",
".",
"getConnectionFactory",
"(",
")",
".",
"getConnection",
"(",
")",
".",
"scan",
"(",
"ScanOptions",
".",
"scanOptions",
"(",
")",
".",
"match",
"... | Get a stream of all CAS-related keys from Redis DB.
@return stream of all CAS-related keys from Redis DB | [
"Get",
"a",
"stream",
"of",
"all",
"CAS",
"-",
"related",
"keys",
"from",
"Redis",
"DB",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-redis-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/RedisTicketRegistry.java#L162-L179 |
126,336 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/profile/DefaultOAuth20UserProfileDataCreator.java | DefaultOAuth20UserProfileDataCreator.getAccessTokenAuthenticationPrincipal | protected Principal getAccessTokenAuthenticationPrincipal(final AccessToken accessToken, final J2EContext context, final RegisteredService registeredService) {
val currentPrincipal = accessToken.getAuthentication().getPrincipal();
LOGGER.debug("Preparing user profile response based on CAS principal [{}]... | java | protected Principal getAccessTokenAuthenticationPrincipal(final AccessToken accessToken, final J2EContext context, final RegisteredService registeredService) {
val currentPrincipal = accessToken.getAuthentication().getPrincipal();
LOGGER.debug("Preparing user profile response based on CAS principal [{}]... | [
"protected",
"Principal",
"getAccessTokenAuthenticationPrincipal",
"(",
"final",
"AccessToken",
"accessToken",
",",
"final",
"J2EContext",
"context",
",",
"final",
"RegisteredService",
"registeredService",
")",
"{",
"val",
"currentPrincipal",
"=",
"accessToken",
".",
"get... | Gets access token authentication principal.
@param accessToken the access token
@param context the context
@param registeredService the registered service
@return the access token authentication principal | [
"Gets",
"access",
"token",
"authentication",
"principal",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/profile/DefaultOAuth20UserProfileDataCreator.java#L68-L76 |
126,337 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/profile/DefaultOAuth20UserProfileDataCreator.java | DefaultOAuth20UserProfileDataCreator.finalizeProfileResponse | protected void finalizeProfileResponse(final AccessToken accessTokenTicket, final Map<String, Object> map, final Principal principal) {
val service = accessTokenTicket.getService();
val registeredService = servicesManager.findServiceBy(service);
if (registeredService instanceof OAuthRegisteredSe... | java | protected void finalizeProfileResponse(final AccessToken accessTokenTicket, final Map<String, Object> map, final Principal principal) {
val service = accessTokenTicket.getService();
val registeredService = servicesManager.findServiceBy(service);
if (registeredService instanceof OAuthRegisteredSe... | [
"protected",
"void",
"finalizeProfileResponse",
"(",
"final",
"AccessToken",
"accessTokenTicket",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
",",
"final",
"Principal",
"principal",
")",
"{",
"val",
"service",
"=",
"accessTokenTicket",
".",
"g... | Finalize profile response.
@param accessTokenTicket the access token ticket
@param map the map
@param principal the authentication principal | [
"Finalize",
"profile",
"response",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/profile/DefaultOAuth20UserProfileDataCreator.java#L85-L93 |
126,338 | apereo/cas | core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/CasCoreConfigurationUtils.java | CasCoreConfigurationUtils.loadYamlProperties | public static Map loadYamlProperties(final Resource... resource) {
val factory = new YamlPropertiesFactoryBean();
factory.setResolutionMethod(YamlProcessor.ResolutionMethod.OVERRIDE);
factory.setResources(resource);
factory.setSingleton(true);
factory.afterPropertiesSet();
... | java | public static Map loadYamlProperties(final Resource... resource) {
val factory = new YamlPropertiesFactoryBean();
factory.setResolutionMethod(YamlProcessor.ResolutionMethod.OVERRIDE);
factory.setResources(resource);
factory.setSingleton(true);
factory.afterPropertiesSet();
... | [
"public",
"static",
"Map",
"loadYamlProperties",
"(",
"final",
"Resource",
"...",
"resource",
")",
"{",
"val",
"factory",
"=",
"new",
"YamlPropertiesFactoryBean",
"(",
")",
";",
"factory",
".",
"setResolutionMethod",
"(",
"YamlProcessor",
".",
"ResolutionMethod",
... | Load yaml properties map.
@param resource the resource
@return the map | [
"Load",
"yaml",
"properties",
"map",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/CasCoreConfigurationUtils.java#L26-L33 |
126,339 | apereo/cas | core/cas-server-core-rest/src/main/java/org/apereo/cas/rest/factory/CasProtocolServiceTicketResourceEntityResponseFactory.java | CasProtocolServiceTicketResourceEntityResponseFactory.grantServiceTicket | protected String grantServiceTicket(final String ticketGrantingTicket, final Service service, final AuthenticationResult authenticationResult) {
val ticket = centralAuthenticationService.grantServiceTicket(ticketGrantingTicket, service, authenticationResult);
LOGGER.debug("Generated service ticket [{}]... | java | protected String grantServiceTicket(final String ticketGrantingTicket, final Service service, final AuthenticationResult authenticationResult) {
val ticket = centralAuthenticationService.grantServiceTicket(ticketGrantingTicket, service, authenticationResult);
LOGGER.debug("Generated service ticket [{}]... | [
"protected",
"String",
"grantServiceTicket",
"(",
"final",
"String",
"ticketGrantingTicket",
",",
"final",
"Service",
"service",
",",
"final",
"AuthenticationResult",
"authenticationResult",
")",
"{",
"val",
"ticket",
"=",
"centralAuthenticationService",
".",
"grantServic... | Grant service ticket service ticket.
@param ticketGrantingTicket the ticket granting ticket
@param service the service
@param authenticationResult the authentication result
@return the service ticket | [
"Grant",
"service",
"ticket",
"service",
"ticket",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-rest/src/main/java/org/apereo/cas/rest/factory/CasProtocolServiceTicketResourceEntityResponseFactory.java#L42-L47 |
126,340 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/authenticator/OAuth20AccessTokenAuthenticator.java | OAuth20AccessTokenAuthenticator.buildUserProfile | protected CommonProfile buildUserProfile(final TokenCredentials tokenCredentials,
final WebContext webContext,
final AccessToken accessToken) {
val userProfile = new CommonProfile(true);
val authentication = access... | java | protected CommonProfile buildUserProfile(final TokenCredentials tokenCredentials,
final WebContext webContext,
final AccessToken accessToken) {
val userProfile = new CommonProfile(true);
val authentication = access... | [
"protected",
"CommonProfile",
"buildUserProfile",
"(",
"final",
"TokenCredentials",
"tokenCredentials",
",",
"final",
"WebContext",
"webContext",
",",
"final",
"AccessToken",
"accessToken",
")",
"{",
"val",
"userProfile",
"=",
"new",
"CommonProfile",
"(",
"true",
")",... | Build user profile common profile.
@param tokenCredentials the token credentials
@param webContext the web context
@param accessToken the access token
@return the common profile | [
"Build",
"user",
"profile",
"common",
"profile",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/authenticator/OAuth20AccessTokenAuthenticator.java#L54-L69 |
126,341 | apereo/cas | support/cas-server-support-validation/src/main/java/org/apereo/cas/web/ServiceValidationViewFactory.java | ServiceValidationViewFactory.getView | public View getView(final HttpServletRequest request,
final boolean isSuccess,
final WebApplicationService service,
final Class ownerClass) {
val type = getValidationResponseType(request, service);
if (type == ValidationResponseType... | java | public View getView(final HttpServletRequest request,
final boolean isSuccess,
final WebApplicationService service,
final Class ownerClass) {
val type = getValidationResponseType(request, service);
if (type == ValidationResponseType... | [
"public",
"View",
"getView",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"boolean",
"isSuccess",
",",
"final",
"WebApplicationService",
"service",
",",
"final",
"Class",
"ownerClass",
")",
"{",
"val",
"type",
"=",
"getValidationResponseType",
"(",
... | Gets view.
@param request the request
@param isSuccess the is success
@param service the service
@param ownerClass the owner class
@return the view | [
"Gets",
"view",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/ServiceValidationViewFactory.java#L124-L135 |
126,342 | apereo/cas | support/cas-server-support-validation/src/main/java/org/apereo/cas/web/ServiceValidationViewFactory.java | ServiceValidationViewFactory.getModelAndView | public ModelAndView getModelAndView(final HttpServletRequest request,
final boolean isSuccess,
final WebApplicationService service,
final Class ownerClass) {
val view = getView(request, isSucc... | java | public ModelAndView getModelAndView(final HttpServletRequest request,
final boolean isSuccess,
final WebApplicationService service,
final Class ownerClass) {
val view = getView(request, isSucc... | [
"public",
"ModelAndView",
"getModelAndView",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"boolean",
"isSuccess",
",",
"final",
"WebApplicationService",
"service",
",",
"final",
"Class",
"ownerClass",
")",
"{",
"val",
"view",
"=",
"getView",
"(",
"... | Gets model and view.
@param request the request
@param isSuccess the is success
@param service the service
@param ownerClass the owner class
@return the model and view | [
"Gets",
"model",
"and",
"view",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/ServiceValidationViewFactory.java#L216-L222 |
126,343 | apereo/cas | support/cas-server-support-validation/src/main/java/org/apereo/cas/web/ServiceValidationViewFactory.java | ServiceValidationViewFactory.getValidationResponseType | private static ValidationResponseType getValidationResponseType(final HttpServletRequest request,
final WebApplicationService service) {
val format = request.getParameter(CasProtocolConstants.PARAMETER_FORMAT);
final Function<String, Va... | java | private static ValidationResponseType getValidationResponseType(final HttpServletRequest request,
final WebApplicationService service) {
val format = request.getParameter(CasProtocolConstants.PARAMETER_FORMAT);
final Function<String, Va... | [
"private",
"static",
"ValidationResponseType",
"getValidationResponseType",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"WebApplicationService",
"service",
")",
"{",
"val",
"format",
"=",
"request",
".",
"getParameter",
"(",
"CasProtocolConstants",
".",
... | Gets validation response type.
@param request the request
@param service the service
@return the validation response type | [
"Gets",
"validation",
"response",
"type",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/ServiceValidationViewFactory.java#L231-L238 |
126,344 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java | DateTimeUtils.localDateTimeOf | public static LocalDateTime localDateTimeOf(final String value) {
var result = (LocalDateTime) null;
try {
result = LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME);
} catch (final Exception e) {
result = null;
}
if (result == null) {
... | java | public static LocalDateTime localDateTimeOf(final String value) {
var result = (LocalDateTime) null;
try {
result = LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME);
} catch (final Exception e) {
result = null;
}
if (result == null) {
... | [
"public",
"static",
"LocalDateTime",
"localDateTimeOf",
"(",
"final",
"String",
"value",
")",
"{",
"var",
"result",
"=",
"(",
"LocalDateTime",
")",
"null",
";",
"try",
"{",
"result",
"=",
"LocalDateTime",
".",
"parse",
"(",
"value",
",",
"DateTimeFormatter",
... | Parse the given value as a local datetime.
@param value the value
@return the date/time instance | [
"Parse",
"the",
"given",
"value",
"as",
"a",
"local",
"datetime",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java#L38-L105 |
126,345 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java | DateTimeUtils.localDateTimeOf | public static LocalDateTime localDateTimeOf(final long time) {
return LocalDateTime.ofInstant(Instant.ofEpochMilli(time), ZoneId.systemDefault());
} | java | public static LocalDateTime localDateTimeOf(final long time) {
return LocalDateTime.ofInstant(Instant.ofEpochMilli(time), ZoneId.systemDefault());
} | [
"public",
"static",
"LocalDateTime",
"localDateTimeOf",
"(",
"final",
"long",
"time",
")",
"{",
"return",
"LocalDateTime",
".",
"ofInstant",
"(",
"Instant",
".",
"ofEpochMilli",
"(",
"time",
")",
",",
"ZoneId",
".",
"systemDefault",
"(",
")",
")",
";",
"}"
] | Local date time of local date time.
@param time the time
@return the local date time | [
"Local",
"date",
"time",
"of",
"local",
"date",
"time",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java#L113-L115 |
126,346 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java | DateTimeUtils.zonedDateTimeOf | public static ZonedDateTime zonedDateTimeOf(final String value) {
try {
return ZonedDateTime.parse(value);
} catch (final Exception e) {
return null;
}
} | java | public static ZonedDateTime zonedDateTimeOf(final String value) {
try {
return ZonedDateTime.parse(value);
} catch (final Exception e) {
return null;
}
} | [
"public",
"static",
"ZonedDateTime",
"zonedDateTimeOf",
"(",
"final",
"String",
"value",
")",
"{",
"try",
"{",
"return",
"ZonedDateTime",
".",
"parse",
"(",
"value",
")",
";",
"}",
"catch",
"(",
"final",
"Exception",
"e",
")",
"{",
"return",
"null",
";",
... | Parse the given value as a zoned datetime.
@param value the value
@return the date/time instance | [
"Parse",
"the",
"given",
"value",
"as",
"a",
"zoned",
"datetime",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java#L133-L139 |
126,347 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java | DateTimeUtils.zonedDateTimeOf | public static ZonedDateTime zonedDateTimeOf(final long time, final ZoneId zoneId) {
return ZonedDateTime.ofInstant(Instant.ofEpochMilli(time), zoneId);
} | java | public static ZonedDateTime zonedDateTimeOf(final long time, final ZoneId zoneId) {
return ZonedDateTime.ofInstant(Instant.ofEpochMilli(time), zoneId);
} | [
"public",
"static",
"ZonedDateTime",
"zonedDateTimeOf",
"(",
"final",
"long",
"time",
",",
"final",
"ZoneId",
"zoneId",
")",
"{",
"return",
"ZonedDateTime",
".",
"ofInstant",
"(",
"Instant",
".",
"ofEpochMilli",
"(",
"time",
")",
",",
"zoneId",
")",
";",
"}"... | Utility for creating a ZonedDateTime object from a millisecond timestamp.
@param time Milliseconds since Epoch
@param zoneId Time zone
@return ZonedDateTime representing time | [
"Utility",
"for",
"creating",
"a",
"ZonedDateTime",
"object",
"from",
"a",
"millisecond",
"timestamp",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java#L178-L180 |
126,348 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java | DateTimeUtils.zonedDateTimeOf | public static ZonedDateTime zonedDateTimeOf(final Calendar time) {
return ZonedDateTime.ofInstant(time.toInstant(), time.getTimeZone().toZoneId());
} | java | public static ZonedDateTime zonedDateTimeOf(final Calendar time) {
return ZonedDateTime.ofInstant(time.toInstant(), time.getTimeZone().toZoneId());
} | [
"public",
"static",
"ZonedDateTime",
"zonedDateTimeOf",
"(",
"final",
"Calendar",
"time",
")",
"{",
"return",
"ZonedDateTime",
".",
"ofInstant",
"(",
"time",
".",
"toInstant",
"(",
")",
",",
"time",
".",
"getTimeZone",
"(",
")",
".",
"toZoneId",
"(",
")",
... | Gets ZonedDateTime for Calendar.
@param time Time object to be converted.
@return ZonedDateTime representing time | [
"Gets",
"ZonedDateTime",
"for",
"Calendar",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java#L198-L200 |
126,349 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java | DateTimeUtils.dateOf | public static Date dateOf(final LocalDate time) {
return Date.from(time.atStartOfDay(ZoneOffset.UTC).toInstant());
} | java | public static Date dateOf(final LocalDate time) {
return Date.from(time.atStartOfDay(ZoneOffset.UTC).toInstant());
} | [
"public",
"static",
"Date",
"dateOf",
"(",
"final",
"LocalDate",
"time",
")",
"{",
"return",
"Date",
".",
"from",
"(",
"time",
".",
"atStartOfDay",
"(",
"ZoneOffset",
".",
"UTC",
")",
".",
"toInstant",
"(",
")",
")",
";",
"}"
] | Date of local date.
@param time the time
@return the date | [
"Date",
"of",
"local",
"date",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java#L238-L240 |
126,350 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java | DateTimeUtils.convertToZonedDateTime | public static ZonedDateTime convertToZonedDateTime(final String value) {
val dt = DateTimeUtils.zonedDateTimeOf(value);
if (dt != null) {
return dt;
}
val lt = DateTimeUtils.localDateTimeOf(value);
return DateTimeUtils.zonedDateTimeOf(lt.atZone(ZoneOffset.UTC));
} | java | public static ZonedDateTime convertToZonedDateTime(final String value) {
val dt = DateTimeUtils.zonedDateTimeOf(value);
if (dt != null) {
return dt;
}
val lt = DateTimeUtils.localDateTimeOf(value);
return DateTimeUtils.zonedDateTimeOf(lt.atZone(ZoneOffset.UTC));
} | [
"public",
"static",
"ZonedDateTime",
"convertToZonedDateTime",
"(",
"final",
"String",
"value",
")",
"{",
"val",
"dt",
"=",
"DateTimeUtils",
".",
"zonedDateTimeOf",
"(",
"value",
")",
";",
"if",
"(",
"dt",
"!=",
"null",
")",
"{",
"return",
"dt",
";",
"}",
... | Convert to zoned date time.
@param value the value
@return the zoned date time | [
"Convert",
"to",
"zoned",
"date",
"time",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java#L288-L295 |
126,351 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java | DateTimeUtils.toTimeUnit | public static TimeUnit toTimeUnit(final ChronoUnit tu) {
if (tu == null) {
return null;
}
switch (tu) {
case DAYS:
return TimeUnit.DAYS;
case HOURS:
return TimeUnit.HOURS;
case MINUTES:
return TimeUni... | java | public static TimeUnit toTimeUnit(final ChronoUnit tu) {
if (tu == null) {
return null;
}
switch (tu) {
case DAYS:
return TimeUnit.DAYS;
case HOURS:
return TimeUnit.HOURS;
case MINUTES:
return TimeUni... | [
"public",
"static",
"TimeUnit",
"toTimeUnit",
"(",
"final",
"ChronoUnit",
"tu",
")",
"{",
"if",
"(",
"tu",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"switch",
"(",
"tu",
")",
"{",
"case",
"DAYS",
":",
"return",
"TimeUnit",
".",
"DAYS",
";",... | To time unit time unit.
@param tu the tu
@return the time unit | [
"To",
"time",
"unit",
"time",
"unit",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java#L303-L325 |
126,352 | apereo/cas | support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java | AbstractThrottledSubmissionHandlerInterceptorAdapter.throttleRequest | protected boolean throttleRequest(final HttpServletRequest request, final HttpServletResponse response) {
return configurationContext.getThrottledRequestExecutor() != null
&& configurationContext.getThrottledRequestExecutor().throttle(request, response);
} | java | protected boolean throttleRequest(final HttpServletRequest request, final HttpServletResponse response) {
return configurationContext.getThrottledRequestExecutor() != null
&& configurationContext.getThrottledRequestExecutor().throttle(request, response);
} | [
"protected",
"boolean",
"throttleRequest",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HttpServletResponse",
"response",
")",
"{",
"return",
"configurationContext",
".",
"getThrottledRequestExecutor",
"(",
")",
"!=",
"null",
"&&",
"configurationContext",... | Is request throttled.
@param request the request
@param response the response
@return true if the request is throttled. False otherwise, letting it proceed. | [
"Is",
"request",
"throttled",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java#L86-L89 |
126,353 | apereo/cas | support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java | AbstractThrottledSubmissionHandlerInterceptorAdapter.shouldResponseBeRecordedAsFailure | protected boolean shouldResponseBeRecordedAsFailure(final HttpServletResponse response) {
val status = response.getStatus();
return status != HttpStatus.SC_CREATED && status != HttpStatus.SC_OK && status != HttpStatus.SC_MOVED_TEMPORARILY;
} | java | protected boolean shouldResponseBeRecordedAsFailure(final HttpServletResponse response) {
val status = response.getStatus();
return status != HttpStatus.SC_CREATED && status != HttpStatus.SC_OK && status != HttpStatus.SC_MOVED_TEMPORARILY;
} | [
"protected",
"boolean",
"shouldResponseBeRecordedAsFailure",
"(",
"final",
"HttpServletResponse",
"response",
")",
"{",
"val",
"status",
"=",
"response",
".",
"getStatus",
"(",
")",
";",
"return",
"status",
"!=",
"HttpStatus",
".",
"SC_CREATED",
"&&",
"status",
"!... | Should response be recorded as failure boolean.
@param response the response
@return the boolean | [
"Should",
"response",
"be",
"recorded",
"as",
"failure",
"boolean",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java#L113-L116 |
126,354 | apereo/cas | support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java | AbstractThrottledSubmissionHandlerInterceptorAdapter.getUsernameParameterFromRequest | protected String getUsernameParameterFromRequest(final HttpServletRequest request) {
return request.getParameter(StringUtils.defaultString(configurationContext.getUsernameParameter(), "username"));
} | java | protected String getUsernameParameterFromRequest(final HttpServletRequest request) {
return request.getParameter(StringUtils.defaultString(configurationContext.getUsernameParameter(), "username"));
} | [
"protected",
"String",
"getUsernameParameterFromRequest",
"(",
"final",
"HttpServletRequest",
"request",
")",
"{",
"return",
"request",
".",
"getParameter",
"(",
"StringUtils",
".",
"defaultString",
"(",
"configurationContext",
".",
"getUsernameParameter",
"(",
")",
","... | Construct username from the request.
@param request the request
@return the string | [
"Construct",
"username",
"from",
"the",
"request",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java#L161-L163 |
126,355 | apereo/cas | support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java | AbstractThrottledSubmissionHandlerInterceptorAdapter.getFailureInRangeCutOffDate | protected Date getFailureInRangeCutOffDate() {
val cutoff = ZonedDateTime.now(ZoneOffset.UTC).minusSeconds(configurationContext.getFailureRangeInSeconds());
return DateTimeUtils.timestampOf(cutoff);
} | java | protected Date getFailureInRangeCutOffDate() {
val cutoff = ZonedDateTime.now(ZoneOffset.UTC).minusSeconds(configurationContext.getFailureRangeInSeconds());
return DateTimeUtils.timestampOf(cutoff);
} | [
"protected",
"Date",
"getFailureInRangeCutOffDate",
"(",
")",
"{",
"val",
"cutoff",
"=",
"ZonedDateTime",
".",
"now",
"(",
"ZoneOffset",
".",
"UTC",
")",
".",
"minusSeconds",
"(",
"configurationContext",
".",
"getFailureRangeInSeconds",
"(",
")",
")",
";",
"retu... | Gets failure in range cut off date.
@return the failure in range cut off date | [
"Gets",
"failure",
"in",
"range",
"cut",
"off",
"date",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java#L170-L173 |
126,356 | apereo/cas | support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java | AbstractThrottledSubmissionHandlerInterceptorAdapter.recordAuditAction | protected void recordAuditAction(final HttpServletRequest request, final String actionName) {
val userToUse = getUsernameParameterFromRequest(request);
val clientInfo = ClientInfoHolder.getClientInfo();
val resource = StringUtils.defaultString(request.getParameter(CasProtocolConstants.PARAMETER_... | java | protected void recordAuditAction(final HttpServletRequest request, final String actionName) {
val userToUse = getUsernameParameterFromRequest(request);
val clientInfo = ClientInfoHolder.getClientInfo();
val resource = StringUtils.defaultString(request.getParameter(CasProtocolConstants.PARAMETER_... | [
"protected",
"void",
"recordAuditAction",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"String",
"actionName",
")",
"{",
"val",
"userToUse",
"=",
"getUsernameParameterFromRequest",
"(",
"request",
")",
";",
"val",
"clientInfo",
"=",
"ClientInfoHolder",... | Records an audit action.
@param request The current HTTP request.
@param actionName Name of the action to be recorded. | [
"Records",
"an",
"audit",
"action",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-throttle-core/src/main/java/org/apereo/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java#L181-L195 |
126,357 | apereo/cas | support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/authn/SamlProfileSamlAuthNStatementBuilder.java | SamlProfileSamlAuthNStatementBuilder.buildAuthnStatement | private AuthnStatement buildAuthnStatement(final Object casAssertion,
final RequestAbstractType authnRequest,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
fin... | java | private AuthnStatement buildAuthnStatement(final Object casAssertion,
final RequestAbstractType authnRequest,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
fin... | [
"private",
"AuthnStatement",
"buildAuthnStatement",
"(",
"final",
"Object",
"casAssertion",
",",
"final",
"RequestAbstractType",
"authnRequest",
",",
"final",
"SamlRegisteredServiceServiceProviderMetadataFacade",
"adaptor",
",",
"final",
"SamlRegisteredService",
"service",
",",... | Creates an authentication statement for the current request.
@param casAssertion the cas assertion
@param authnRequest the authn request
@param adaptor the adaptor
@param service the service
@param binding the binding
@param messageContext the message context
@param request the request
... | [
"Creates",
"an",
"authentication",
"statement",
"for",
"the",
"current",
"request",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/authn/SamlProfileSamlAuthNStatementBuilder.java#L75-L98 |
126,358 | apereo/cas | support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/authn/SamlProfileSamlAuthNStatementBuilder.java | SamlProfileSamlAuthNStatementBuilder.buildSubjectLocality | protected SubjectLocality buildSubjectLocality(final Object assertion, final RequestAbstractType authnRequest,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
final String binding) throws SamlExceptio... | java | protected SubjectLocality buildSubjectLocality(final Object assertion, final RequestAbstractType authnRequest,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
final String binding) throws SamlExceptio... | [
"protected",
"SubjectLocality",
"buildSubjectLocality",
"(",
"final",
"Object",
"assertion",
",",
"final",
"RequestAbstractType",
"authnRequest",
",",
"final",
"SamlRegisteredServiceServiceProviderMetadataFacade",
"adaptor",
",",
"final",
"String",
"binding",
")",
"throws",
... | Build subject locality subject locality.
@param assertion the assertion
@param authnRequest the authn request
@param adaptor the adaptor
@param binding the binding
@return the subject locality
@throws SamlException the saml exception | [
"Build",
"subject",
"locality",
"subject",
"locality",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/authn/SamlProfileSamlAuthNStatementBuilder.java#L110-L119 |
126,359 | apereo/cas | support/cas-server-support-discovery-profile/src/main/java/org/apereo/cas/discovery/CasServerProfileRegistrar.java | CasServerProfileRegistrar.getProfile | public CasServerProfile getProfile() {
val profile = new CasServerProfile();
profile.setRegisteredServiceTypesSupported(locateRegisteredServiceTypesSupported());
profile.setRegisteredServiceTypes(locateRegisteredServiceTypesActive());
profile.setMultifactorAuthenticationProviderTypesSupp... | java | public CasServerProfile getProfile() {
val profile = new CasServerProfile();
profile.setRegisteredServiceTypesSupported(locateRegisteredServiceTypesSupported());
profile.setRegisteredServiceTypes(locateRegisteredServiceTypesActive());
profile.setMultifactorAuthenticationProviderTypesSupp... | [
"public",
"CasServerProfile",
"getProfile",
"(",
")",
"{",
"val",
"profile",
"=",
"new",
"CasServerProfile",
"(",
")",
";",
"profile",
".",
"setRegisteredServiceTypesSupported",
"(",
"locateRegisteredServiceTypesSupported",
"(",
")",
")",
";",
"profile",
".",
"setRe... | Gets profile.
@return the profile | [
"Gets",
"profile",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-discovery-profile/src/main/java/org/apereo/cas/discovery/CasServerProfileRegistrar.java#L136-L146 |
126,360 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/SimpleUrlValidator.java | SimpleUrlValidator.getInstance | public static org.apereo.cas.web.UrlValidator getInstance() {
if (INSTANCE == null) {
INSTANCE = new SimpleUrlValidator(UrlValidator.getInstance(), DomainValidator.getInstance());
}
return INSTANCE;
} | java | public static org.apereo.cas.web.UrlValidator getInstance() {
if (INSTANCE == null) {
INSTANCE = new SimpleUrlValidator(UrlValidator.getInstance(), DomainValidator.getInstance());
}
return INSTANCE;
} | [
"public",
"static",
"org",
".",
"apereo",
".",
"cas",
".",
"web",
".",
"UrlValidator",
"getInstance",
"(",
")",
"{",
"if",
"(",
"INSTANCE",
"==",
"null",
")",
"{",
"INSTANCE",
"=",
"new",
"SimpleUrlValidator",
"(",
"UrlValidator",
".",
"getInstance",
"(",
... | Gets a static instance to be used internal only.
@return the instance | [
"Gets",
"a",
"static",
"instance",
"to",
"be",
"used",
"internal",
"only",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/SimpleUrlValidator.java#L27-L32 |
126,361 | apereo/cas | webapp/cas-server-webapp-init-eureka-server/src/main/java/org/apereo/cas/CasEurekaServerWebApplication.java | CasEurekaServerWebApplication.handleApplicationReadyEvent | @EventListener
public void handleApplicationReadyEvent(final ApplicationReadyEvent event) {
AsciiArtUtils.printAsciiArtInfo(LOGGER, "READY", StringUtils.EMPTY);
LOGGER.info("Ready to process requests @ [{}]", DateTimeUtils.zonedDateTimeOf(event.getTimestamp()));
} | java | @EventListener
public void handleApplicationReadyEvent(final ApplicationReadyEvent event) {
AsciiArtUtils.printAsciiArtInfo(LOGGER, "READY", StringUtils.EMPTY);
LOGGER.info("Ready to process requests @ [{}]", DateTimeUtils.zonedDateTimeOf(event.getTimestamp()));
} | [
"@",
"EventListener",
"public",
"void",
"handleApplicationReadyEvent",
"(",
"final",
"ApplicationReadyEvent",
"event",
")",
"{",
"AsciiArtUtils",
".",
"printAsciiArtInfo",
"(",
"LOGGER",
",",
"\"READY\"",
",",
"StringUtils",
".",
"EMPTY",
")",
";",
"LOGGER",
".",
... | Handle application ready event.
@param event the event | [
"Handle",
"application",
"ready",
"event",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/webapp/cas-server-webapp-init-eureka-server/src/main/java/org/apereo/cas/CasEurekaServerWebApplication.java#L72-L76 |
126,362 | apereo/cas | support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/revocation/checker/CRLDistributionPointRevocationChecker.java | CRLDistributionPointRevocationChecker.getDistributionPoints | private static URI[] getDistributionPoints(final X509Certificate cert) {
try {
val points = new ExtensionReader(cert).readCRLDistributionPoints();
val urls = new ArrayList<URI>();
if (points != null) {
points.stream().map(DistributionPoint::getDistributionPoin... | java | private static URI[] getDistributionPoints(final X509Certificate cert) {
try {
val points = new ExtensionReader(cert).readCRLDistributionPoints();
val urls = new ArrayList<URI>();
if (points != null) {
points.stream().map(DistributionPoint::getDistributionPoin... | [
"private",
"static",
"URI",
"[",
"]",
"getDistributionPoints",
"(",
"final",
"X509Certificate",
"cert",
")",
"{",
"try",
"{",
"val",
"points",
"=",
"new",
"ExtensionReader",
"(",
"cert",
")",
".",
"readCRLDistributionPoints",
"(",
")",
";",
"val",
"urls",
"=... | Gets the distribution points.
@param cert the cert
@return the url distribution points | [
"Gets",
"the",
"distribution",
"points",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/revocation/checker/CRLDistributionPointRevocationChecker.java#L116-L138 |
126,363 | apereo/cas | support/cas-server-support-wsfederation-webflow/src/main/java/org/apereo/cas/web/flow/WsFederationAction.java | WsFederationAction.doExecute | @Override
protected Event doExecute(final RequestContext context) {
try {
val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
val wa = request.getParameter(WA);
if (StringUtils.isNotBlank(wa) && wa.equalsIgnoreCase(WSIGNIN)) {
... | java | @Override
protected Event doExecute(final RequestContext context) {
try {
val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
val wa = request.getParameter(WA);
if (StringUtils.isNotBlank(wa) && wa.equalsIgnoreCase(WSIGNIN)) {
... | [
"@",
"Override",
"protected",
"Event",
"doExecute",
"(",
"final",
"RequestContext",
"context",
")",
"{",
"try",
"{",
"val",
"request",
"=",
"WebUtils",
".",
"getHttpServletRequestFromExternalWebflowContext",
"(",
"context",
")",
";",
"val",
"wa",
"=",
"request",
... | Executes the webflow action.
@param context the context
@return the event | [
"Executes",
"the",
"webflow",
"action",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-wsfederation-webflow/src/main/java/org/apereo/cas/web/flow/WsFederationAction.java#L51-L65 |
126,364 | apereo/cas | support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlIdPMetadataDocument.java | SamlIdPMetadataDocument.isValid | @JsonIgnore
public boolean isValid() {
return StringUtils.isNotBlank(getMetadata())
&& StringUtils.isNotBlank(getSigningCertificate())
&& StringUtils.isNotBlank(getSigningKey())
&& StringUtils.isNotBlank(getEncryptionCertificate())
&& StringUtils.isNotBlank(ge... | java | @JsonIgnore
public boolean isValid() {
return StringUtils.isNotBlank(getMetadata())
&& StringUtils.isNotBlank(getSigningCertificate())
&& StringUtils.isNotBlank(getSigningKey())
&& StringUtils.isNotBlank(getEncryptionCertificate())
&& StringUtils.isNotBlank(ge... | [
"@",
"JsonIgnore",
"public",
"boolean",
"isValid",
"(",
")",
"{",
"return",
"StringUtils",
".",
"isNotBlank",
"(",
"getMetadata",
"(",
")",
")",
"&&",
"StringUtils",
".",
"isNotBlank",
"(",
"getSigningCertificate",
"(",
")",
")",
"&&",
"StringUtils",
".",
"i... | Is this document valid and has any of the fields?
@return true /false | [
"Is",
"this",
"document",
"valid",
"and",
"has",
"any",
"of",
"the",
"fields?"
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlIdPMetadataDocument.java#L103-L110 |
126,365 | apereo/cas | support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlIdPMetadataDocument.java | SamlIdPMetadataDocument.getSigningCertificateDecoded | @JsonIgnore
public String getSigningCertificateDecoded() {
if (EncodingUtils.isBase64(signingCertificate)) {
return EncodingUtils.decodeBase64ToString(signingCertificate);
}
return signingCertificate;
} | java | @JsonIgnore
public String getSigningCertificateDecoded() {
if (EncodingUtils.isBase64(signingCertificate)) {
return EncodingUtils.decodeBase64ToString(signingCertificate);
}
return signingCertificate;
} | [
"@",
"JsonIgnore",
"public",
"String",
"getSigningCertificateDecoded",
"(",
")",
"{",
"if",
"(",
"EncodingUtils",
".",
"isBase64",
"(",
"signingCertificate",
")",
")",
"{",
"return",
"EncodingUtils",
".",
"decodeBase64ToString",
"(",
"signingCertificate",
")",
";",
... | Gets signing certificate decoded.
@return the signing certificate decoded | [
"Gets",
"signing",
"certificate",
"decoded",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlIdPMetadataDocument.java#L117-L123 |
126,366 | apereo/cas | support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlIdPMetadataDocument.java | SamlIdPMetadataDocument.getEncryptionCertificateDecoded | @JsonIgnore
public String getEncryptionCertificateDecoded() {
if (EncodingUtils.isBase64(encryptionCertificate)) {
return EncodingUtils.decodeBase64ToString(encryptionCertificate);
}
return encryptionCertificate;
} | java | @JsonIgnore
public String getEncryptionCertificateDecoded() {
if (EncodingUtils.isBase64(encryptionCertificate)) {
return EncodingUtils.decodeBase64ToString(encryptionCertificate);
}
return encryptionCertificate;
} | [
"@",
"JsonIgnore",
"public",
"String",
"getEncryptionCertificateDecoded",
"(",
")",
"{",
"if",
"(",
"EncodingUtils",
".",
"isBase64",
"(",
"encryptionCertificate",
")",
")",
"{",
"return",
"EncodingUtils",
".",
"decodeBase64ToString",
"(",
"encryptionCertificate",
")"... | Gets encryption certificate decoded.
@return the encryption certificate decoded | [
"Gets",
"encryption",
"certificate",
"decoded",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlIdPMetadataDocument.java#L130-L136 |
126,367 | apereo/cas | support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlIdPMetadataDocument.java | SamlIdPMetadataDocument.getMetadataDecoded | @JsonIgnore
public String getMetadataDecoded() {
if (EncodingUtils.isBase64(metadata)) {
return EncodingUtils.decodeBase64ToString(metadata);
}
return metadata;
} | java | @JsonIgnore
public String getMetadataDecoded() {
if (EncodingUtils.isBase64(metadata)) {
return EncodingUtils.decodeBase64ToString(metadata);
}
return metadata;
} | [
"@",
"JsonIgnore",
"public",
"String",
"getMetadataDecoded",
"(",
")",
"{",
"if",
"(",
"EncodingUtils",
".",
"isBase64",
"(",
"metadata",
")",
")",
"{",
"return",
"EncodingUtils",
".",
"decodeBase64ToString",
"(",
"metadata",
")",
";",
"}",
"return",
"metadata... | Gets metadata decoded.
@return the metadata decoded | [
"Gets",
"metadata",
"decoded",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlIdPMetadataDocument.java#L143-L149 |
126,368 | apereo/cas | support/cas-server-support-openid/src/main/java/org/apereo/cas/web/DelegatingController.java | DelegatingController.handleRequestInternal | @Override
protected ModelAndView handleRequestInternal(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
for (val delegate : this.delegates) {
if (delegate.canHandle(request, response)) {
return delegate.handleRequestInternal(request, respon... | java | @Override
protected ModelAndView handleRequestInternal(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
for (val delegate : this.delegates) {
if (delegate.canHandle(request, response)) {
return delegate.handleRequestInternal(request, respon... | [
"@",
"Override",
"protected",
"ModelAndView",
"handleRequestInternal",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HttpServletResponse",
"response",
")",
"throws",
"Exception",
"{",
"for",
"(",
"val",
"delegate",
":",
"this",
".",
"delegates",
")",... | Handles the request.
Ask all delegates if they can handle the current request.
The first to answer true is elected as the delegate that will process the request.
If no controller answers true, we redirect to the error page.
@param request the request to handle
@param response the response to write to
@return the mode... | [
"Handles",
"the",
"request",
".",
"Ask",
"all",
"delegates",
"if",
"they",
"can",
"handle",
"the",
"current",
"request",
".",
"The",
"first",
"to",
"answer",
"true",
"is",
"elected",
"as",
"the",
"delegate",
"that",
"will",
"process",
"the",
"request",
"."... | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-openid/src/main/java/org/apereo/cas/web/DelegatingController.java#L49-L57 |
126,369 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getAssertionFrom | protected Assertion getAssertionFrom(final Map<String, Object> model) {
return (Assertion) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ASSERTION);
} | java | protected Assertion getAssertionFrom(final Map<String, Object> model) {
return (Assertion) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ASSERTION);
} | [
"protected",
"Assertion",
"getAssertionFrom",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"return",
"(",
"Assertion",
")",
"model",
".",
"get",
"(",
"CasViewConstants",
".",
"MODEL_ATTRIBUTE_NAME_ASSERTION",
")",
";",
"}"
] | Gets the assertion from the model.
@param model the model
@return the assertion from | [
"Gets",
"the",
"assertion",
"from",
"the",
"model",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L76-L78 |
126,370 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getErrorCodeFrom | protected String getErrorCodeFrom(final Map<String, Object> model) {
return model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ERROR_CODE).toString();
} | java | protected String getErrorCodeFrom(final Map<String, Object> model) {
return model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ERROR_CODE).toString();
} | [
"protected",
"String",
"getErrorCodeFrom",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"return",
"model",
".",
"get",
"(",
"CasViewConstants",
".",
"MODEL_ATTRIBUTE_NAME_ERROR_CODE",
")",
".",
"toString",
"(",
")",
";",
"}"
] | Gets error code from.
@param model the model
@return the error code from | [
"Gets",
"error",
"code",
"from",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L86-L88 |
126,371 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getErrorDescriptionFrom | protected String getErrorDescriptionFrom(final Map<String, Object> model) {
return model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ERROR_DESCRIPTION).toString();
} | java | protected String getErrorDescriptionFrom(final Map<String, Object> model) {
return model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ERROR_DESCRIPTION).toString();
} | [
"protected",
"String",
"getErrorDescriptionFrom",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"return",
"model",
".",
"get",
"(",
"CasViewConstants",
".",
"MODEL_ATTRIBUTE_NAME_ERROR_DESCRIPTION",
")",
".",
"toString",
"(",
")",
";... | Gets error description from.
@param model the model
@return the error description from | [
"Gets",
"error",
"description",
"from",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L96-L98 |
126,372 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getProxyGrantingTicketIou | protected String getProxyGrantingTicketIou(final Map<String, Object> model) {
return (String) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET_IOU);
} | java | protected String getProxyGrantingTicketIou(final Map<String, Object> model) {
return (String) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET_IOU);
} | [
"protected",
"String",
"getProxyGrantingTicketIou",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"return",
"(",
"String",
")",
"model",
".",
"get",
"(",
"CasViewConstants",
".",
"MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET_IOU",
")",
"... | Gets the PGT-IOU from the model.
@param model the model
@return the pgt-iou id | [
"Gets",
"the",
"PGT",
"-",
"IOU",
"from",
"the",
"model",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L107-L109 |
126,373 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getModelAttributes | protected Map<String, Object> getModelAttributes(final Map<String, Object> model) {
return (Map<String, Object>) model.get(CasProtocolConstants.VALIDATION_CAS_MODEL_ATTRIBUTE_NAME_ATTRIBUTES);
} | java | protected Map<String, Object> getModelAttributes(final Map<String, Object> model) {
return (Map<String, Object>) model.get(CasProtocolConstants.VALIDATION_CAS_MODEL_ATTRIBUTE_NAME_ATTRIBUTES);
} | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"getModelAttributes",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"return",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"model",
".",
"get",
"(",
"CasProtocol... | Gets model attributes.
@param model the model
@return the model attributes | [
"Gets",
"model",
"attributes",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L128-L130 |
126,374 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getPrincipalAttributesAsMultiValuedAttributes | protected Map<String, List<Object>> getPrincipalAttributesAsMultiValuedAttributes(final Map<String, Object> model) {
return getPrincipal(model).getAttributes();
} | java | protected Map<String, List<Object>> getPrincipalAttributesAsMultiValuedAttributes(final Map<String, Object> model) {
return getPrincipal(model).getAttributes();
} | [
"protected",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"getPrincipalAttributesAsMultiValuedAttributes",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"return",
"getPrincipal",
"(",
"model",
")",
".",
"getAttribute... | Gets principal attributes.
Single-valued attributes are converted to a collection
so the review can easily loop through all.
@param model the model
@return the attributes
@since 4.1.0 | [
"Gets",
"principal",
"attributes",
".",
"Single",
"-",
"valued",
"attributes",
"are",
"converted",
"to",
"a",
"collection",
"so",
"the",
"review",
"can",
"easily",
"loop",
"through",
"all",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L153-L155 |
126,375 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getServiceFrom | protected Service getServiceFrom(final Map<String, Object> model) {
return (Service) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_SERVICE);
} | java | protected Service getServiceFrom(final Map<String, Object> model) {
return (Service) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_SERVICE);
} | [
"protected",
"Service",
"getServiceFrom",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"return",
"(",
"Service",
")",
"model",
".",
"get",
"(",
"CasViewConstants",
".",
"MODEL_ATTRIBUTE_NAME_SERVICE",
")",
";",
"}"
] | Gets validated service from the model.
@param model the model
@return the validated service from | [
"Gets",
"validated",
"service",
"from",
"the",
"model",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L164-L166 |
126,376 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getChainedAuthentications | protected Collection<Authentication> getChainedAuthentications(final Map<String, Object> model) {
val assertion = getAssertionFrom(model);
val chainedAuthentications = assertion.getChainedAuthentications();
return chainedAuthentications.stream().limit(chainedAuthentications.size() - 1).collect(C... | java | protected Collection<Authentication> getChainedAuthentications(final Map<String, Object> model) {
val assertion = getAssertionFrom(model);
val chainedAuthentications = assertion.getChainedAuthentications();
return chainedAuthentications.stream().limit(chainedAuthentications.size() - 1).collect(C... | [
"protected",
"Collection",
"<",
"Authentication",
">",
"getChainedAuthentications",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"val",
"assertion",
"=",
"getAssertionFrom",
"(",
"model",
")",
";",
"val",
"chainedAuthentications",
"... | Gets chained authentications.
Note that the last index in the list always describes the primary authentication
event. All others in the chain should denote proxies. Per the CAS protocol,
when authentication has proceeded through multiple proxies,
the order in which the proxies were traversed MUST be reflected in the re... | [
"Gets",
"chained",
"authentications",
".",
"Note",
"that",
"the",
"last",
"index",
"in",
"the",
"list",
"always",
"describes",
"the",
"primary",
"authentication",
"event",
".",
"All",
"others",
"in",
"the",
"chain",
"should",
"denote",
"proxies",
".",
"Per",
... | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L180-L184 |
126,377 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.putIntoModel | protected void putIntoModel(final Map<String, Object> model, final String key, final Object value) {
LOGGER.trace("Adding attribute [{}] into the view model for [{}] with value [{}]", key, getClass().getSimpleName(), value);
model.put(key, value);
} | java | protected void putIntoModel(final Map<String, Object> model, final String key, final Object value) {
LOGGER.trace("Adding attribute [{}] into the view model for [{}] with value [{}]", key, getClass().getSimpleName(), value);
model.put(key, value);
} | [
"protected",
"void",
"putIntoModel",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
",",
"final",
"String",
"key",
",",
"final",
"Object",
"value",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"\"Adding attribute [{}] into the view model for [{}] with ... | Put into model.
@param model the model
@param key the key
@param value the value | [
"Put",
"into",
"model",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L193-L196 |
126,378 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getCasProtocolAuthenticationAttributes | protected Map<String, List<Object>> getCasProtocolAuthenticationAttributes(final Map<String, Object> model,
final RegisteredService registeredService) {
val authn = getPrimaryAuthenticationFrom(model);
val assertion = getAssertionF... | java | protected Map<String, List<Object>> getCasProtocolAuthenticationAttributes(final Map<String, Object> model,
final RegisteredService registeredService) {
val authn = getPrimaryAuthenticationFrom(model);
val assertion = getAssertionF... | [
"protected",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"getCasProtocolAuthenticationAttributes",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
",",
"final",
"RegisteredService",
"registeredService",
")",
"{",
"val",
"authn",
... | Put cas authentication attributes into model.
@param model the model
@param registeredService the registered service
@return the cas authentication attributes | [
"Put",
"cas",
"authentication",
"attributes",
"into",
"model",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L205-L211 |
126,379 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.prepareViewModelWithAuthenticationPrincipal | protected Map prepareViewModelWithAuthenticationPrincipal(final Map<String, Object> model) {
putIntoModel(model, CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL, getPrincipal(model));
putIntoModel(model, CasViewConstants.MODEL_ATTRIBUTE_NAME_CHAINED_AUTHENTICATIONS, getChainedAuthentications(model));
... | java | protected Map prepareViewModelWithAuthenticationPrincipal(final Map<String, Object> model) {
putIntoModel(model, CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL, getPrincipal(model));
putIntoModel(model, CasViewConstants.MODEL_ATTRIBUTE_NAME_CHAINED_AUTHENTICATIONS, getChainedAuthentications(model));
... | [
"protected",
"Map",
"prepareViewModelWithAuthenticationPrincipal",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"putIntoModel",
"(",
"model",
",",
"CasViewConstants",
".",
"MODEL_ATTRIBUTE_NAME_PRINCIPAL",
",",
"getPrincipal",
"(",
"model... | Prepare view model with authentication principal.
@param model the model
@return the map | [
"Prepare",
"view",
"model",
"with",
"authentication",
"principal",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L219-L225 |
126,380 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.prepareCasResponseAttributesForViewModel | protected void prepareCasResponseAttributesForViewModel(final Map<String, Object> model) {
val service = authenticationRequestServiceSelectionStrategies.resolveService(getServiceFrom(model));
val registeredService = this.servicesManager.findServiceBy(service);
val principalAttributes = getCasPr... | java | protected void prepareCasResponseAttributesForViewModel(final Map<String, Object> model) {
val service = authenticationRequestServiceSelectionStrategies.resolveService(getServiceFrom(model));
val registeredService = this.servicesManager.findServiceBy(service);
val principalAttributes = getCasPr... | [
"protected",
"void",
"prepareCasResponseAttributesForViewModel",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
")",
"{",
"val",
"service",
"=",
"authenticationRequestServiceSelectionStrategies",
".",
"resolveService",
"(",
"getServiceFrom",
"(",
"mode... | Prepare cas response attributes for view model.
@param model the model | [
"Prepare",
"cas",
"response",
"attributes",
"for",
"view",
"model",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L232-L245 |
126,381 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.getCasPrincipalAttributes | protected Map<String, List<Object>> getCasPrincipalAttributes(final Map<String, Object> model, final RegisteredService registeredService) {
return getPrincipalAttributesAsMultiValuedAttributes(model);
} | java | protected Map<String, List<Object>> getCasPrincipalAttributes(final Map<String, Object> model, final RegisteredService registeredService) {
return getPrincipalAttributesAsMultiValuedAttributes(model);
} | [
"protected",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"getCasPrincipalAttributes",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
",",
"final",
"RegisteredService",
"registeredService",
")",
"{",
"return",
"getPrincipalAttrib... | Put cas principal attributes into model.
@param model the model
@param registeredService the registered service
@return the cas principal attributes | [
"Put",
"cas",
"principal",
"attributes",
"into",
"model",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L254-L256 |
126,382 | apereo/cas | core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java | AbstractCasView.putCasResponseAttributesIntoModel | protected void putCasResponseAttributesIntoModel(final Map<String, Object> model,
final Map<String, Object> attributes,
final RegisteredService registeredService,
... | java | protected void putCasResponseAttributesIntoModel(final Map<String, Object> model,
final Map<String, Object> attributes,
final RegisteredService registeredService,
... | [
"protected",
"void",
"putCasResponseAttributesIntoModel",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"attributes",
",",
"final",
"RegisteredService",
"registeredService",
",",
"final",
... | Put cas response attributes into model.
@param model the model
@param attributes the attributes
@param registeredService the registered service
@param attributesRenderer the attributes renderer | [
"Put",
"cas",
"response",
"attributes",
"into",
"model",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L266-L279 |
126,383 | apereo/cas | support/cas-server-support-audit-couchdb/src/main/java/org/apereo/cas/couchdb/audit/AuditActionContextCouchDbRepository.java | AuditActionContextCouchDbRepository.findAuditRecordsSince | @View(name = "by_when_action_was_performed", map = "function(doc) { if(doc.whenActionWasPerformed) { emit(doc.whenActionWasPerformed, doc) } }")
public List<CouchDbAuditActionContext> findAuditRecordsSince(final LocalDate localDate) {
return db.queryView(createQuery("by_when_action_was_performed").startKey(... | java | @View(name = "by_when_action_was_performed", map = "function(doc) { if(doc.whenActionWasPerformed) { emit(doc.whenActionWasPerformed, doc) } }")
public List<CouchDbAuditActionContext> findAuditRecordsSince(final LocalDate localDate) {
return db.queryView(createQuery("by_when_action_was_performed").startKey(... | [
"@",
"View",
"(",
"name",
"=",
"\"by_when_action_was_performed\"",
",",
"map",
"=",
"\"function(doc) { if(doc.whenActionWasPerformed) { emit(doc.whenActionWasPerformed, doc) } }\"",
")",
"public",
"List",
"<",
"CouchDbAuditActionContext",
">",
"findAuditRecordsSince",
"(",
"final... | Find audit records since +localDate+.
@param localDate Date to search from.
@return Audit records from after +localDate+. | [
"Find",
"audit",
"records",
"since",
"+",
"localDate",
"+",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-audit-couchdb/src/main/java/org/apereo/cas/couchdb/audit/AuditActionContextCouchDbRepository.java#L34-L37 |
126,384 | apereo/cas | support/cas-server-support-audit-couchdb/src/main/java/org/apereo/cas/couchdb/audit/AuditActionContextCouchDbRepository.java | AuditActionContextCouchDbRepository.findByThrottleParams | @View(name = "by_throttle_params", map = "classpath:CouchDbAuditActionContext_by_throttle_params.js")
public List<CouchDbAuditActionContext> findByThrottleParams(final String remoteAddress, final String username, final String failureCode,
final String ... | java | @View(name = "by_throttle_params", map = "classpath:CouchDbAuditActionContext_by_throttle_params.js")
public List<CouchDbAuditActionContext> findByThrottleParams(final String remoteAddress, final String username, final String failureCode,
final String ... | [
"@",
"View",
"(",
"name",
"=",
"\"by_throttle_params\"",
",",
"map",
"=",
"\"classpath:CouchDbAuditActionContext_by_throttle_params.js\"",
")",
"public",
"List",
"<",
"CouchDbAuditActionContext",
">",
"findByThrottleParams",
"(",
"final",
"String",
"remoteAddress",
",",
"... | Find audit records for authentication throttling.
@param remoteAddress remote IP address
@param username username
@param failureCode failure code
@param applicationCode application code
@param cutoffTime cut off time
@return records for authentication throttleing decision | [
"Find",
"audit",
"records",
"for",
"authentication",
"throttling",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-audit-couchdb/src/main/java/org/apereo/cas/couchdb/audit/AuditActionContextCouchDbRepository.java#L48-L54 |
126,385 | apereo/cas | support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java | DelegatedClientWebflowManager.buildTicketProperties | protected Map<String, Serializable> buildTicketProperties(final J2EContext webContext) {
val properties = new HashMap<String, Serializable>();
val themeParamName = casProperties.getTheme().getParamName();
val localParamName = casProperties.getLocale().getParamName();
properties.put(the... | java | protected Map<String, Serializable> buildTicketProperties(final J2EContext webContext) {
val properties = new HashMap<String, Serializable>();
val themeParamName = casProperties.getTheme().getParamName();
val localParamName = casProperties.getLocale().getParamName();
properties.put(the... | [
"protected",
"Map",
"<",
"String",
",",
"Serializable",
">",
"buildTicketProperties",
"(",
"final",
"J2EContext",
"webContext",
")",
"{",
"val",
"properties",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Serializable",
">",
"(",
")",
";",
"val",
"themeParamName... | Build the ticket properties.
@param webContext the web context
@return the ticket properties | [
"Build",
"the",
"ticket",
"properties",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java#L117-L129 |
126,386 | apereo/cas | support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java | DelegatedClientWebflowManager.restoreDelegatedAuthenticationRequest | protected Service restoreDelegatedAuthenticationRequest(final RequestContext requestContext, final WebContext webContext,
final TransientSessionTicket ticket) {
val service = ticket.getService();
LOGGER.trace("Restoring requested service [{}] b... | java | protected Service restoreDelegatedAuthenticationRequest(final RequestContext requestContext, final WebContext webContext,
final TransientSessionTicket ticket) {
val service = ticket.getService();
LOGGER.trace("Restoring requested service [{}] b... | [
"protected",
"Service",
"restoreDelegatedAuthenticationRequest",
"(",
"final",
"RequestContext",
"requestContext",
",",
"final",
"WebContext",
"webContext",
",",
"final",
"TransientSessionTicket",
"ticket",
")",
"{",
"val",
"service",
"=",
"ticket",
".",
"getService",
"... | Restore the information saved in the ticket and return the service.
@param requestContext the request context
@param webContext the web context
@param ticket the ticket
@return the service | [
"Restore",
"the",
"information",
"saved",
"in",
"the",
"ticket",
"and",
"return",
"the",
"service",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java#L157-L173 |
126,387 | apereo/cas | support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java | DelegatedClientWebflowManager.retrieveSessionTicketViaClientId | protected TransientSessionTicket retrieveSessionTicketViaClientId(final WebContext webContext, final String clientId) {
val ticket = this.ticketRegistry.getTicket(clientId, TransientSessionTicket.class);
if (ticket == null) {
LOGGER.error("Delegated client identifier cannot be located in the... | java | protected TransientSessionTicket retrieveSessionTicketViaClientId(final WebContext webContext, final String clientId) {
val ticket = this.ticketRegistry.getTicket(clientId, TransientSessionTicket.class);
if (ticket == null) {
LOGGER.error("Delegated client identifier cannot be located in the... | [
"protected",
"TransientSessionTicket",
"retrieveSessionTicketViaClientId",
"(",
"final",
"WebContext",
"webContext",
",",
"final",
"String",
"clientId",
")",
"{",
"val",
"ticket",
"=",
"this",
".",
"ticketRegistry",
".",
"getTicket",
"(",
"clientId",
",",
"TransientSe... | Retrieve session ticket via client id.
@param webContext the web context
@param clientId the client id
@return the transient session ticket | [
"Retrieve",
"session",
"ticket",
"via",
"client",
"id",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java#L182-L195 |
126,388 | apereo/cas | support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java | DelegatedClientWebflowManager.getDelegatedClientId | protected String getDelegatedClientId(final WebContext webContext, final BaseClient client) {
var clientId = webContext.getRequestParameter(PARAMETER_CLIENT_ID);
if (StringUtils.isBlank(clientId)) {
if (client instanceof SAML2Client) {
LOGGER.debug("Client identifier could no... | java | protected String getDelegatedClientId(final WebContext webContext, final BaseClient client) {
var clientId = webContext.getRequestParameter(PARAMETER_CLIENT_ID);
if (StringUtils.isBlank(clientId)) {
if (client instanceof SAML2Client) {
LOGGER.debug("Client identifier could no... | [
"protected",
"String",
"getDelegatedClientId",
"(",
"final",
"WebContext",
"webContext",
",",
"final",
"BaseClient",
"client",
")",
"{",
"var",
"clientId",
"=",
"webContext",
".",
"getRequestParameter",
"(",
"PARAMETER_CLIENT_ID",
")",
";",
"if",
"(",
"StringUtils",... | Gets delegated client id.
@param webContext the web context
@param client the client
@return the delegated client id | [
"Gets",
"delegated",
"client",
"id",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientWebflowManager.java#L205-L225 |
126,389 | apereo/cas | support/cas-server-support-soap-authentication/src/main/java/org/apereo/cas/authentication/SoapAuthenticationClient.java | SoapAuthenticationClient.setCredentials | public void setCredentials(final UsernamePasswordCredential credential) {
val wss4jSecurityInterceptor = new Wss4jSecurityInterceptor();
wss4jSecurityInterceptor.setSecurementActions("Timestamp UsernameToken");
wss4jSecurityInterceptor.setSecurementUsername(credential.getUsername());
wss... | java | public void setCredentials(final UsernamePasswordCredential credential) {
val wss4jSecurityInterceptor = new Wss4jSecurityInterceptor();
wss4jSecurityInterceptor.setSecurementActions("Timestamp UsernameToken");
wss4jSecurityInterceptor.setSecurementUsername(credential.getUsername());
wss... | [
"public",
"void",
"setCredentials",
"(",
"final",
"UsernamePasswordCredential",
"credential",
")",
"{",
"val",
"wss4jSecurityInterceptor",
"=",
"new",
"Wss4jSecurityInterceptor",
"(",
")",
";",
"wss4jSecurityInterceptor",
".",
"setSecurementActions",
"(",
"\"Timestamp Usern... | Configure credentials.
@param credential the credential | [
"Configure",
"credentials",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-soap-authentication/src/main/java/org/apereo/cas/authentication/SoapAuthenticationClient.java#L35-L41 |
126,390 | apereo/cas | support/cas-server-support-reports-core/src/main/java/org/apereo/cas/web/report/StatisticsEndpoint.java | StatisticsEndpoint.handle | @ReadOperation
public Map<String, Object> handle() {
val model = new HashMap<String, Object>();
val diff = Duration.between(this.upTimeStartDate, ZonedDateTime.now(ZoneOffset.UTC));
model.put("upTime", diff.getSeconds());
val runtime = Runtime.getRuntime();
model.put("total... | java | @ReadOperation
public Map<String, Object> handle() {
val model = new HashMap<String, Object>();
val diff = Duration.between(this.upTimeStartDate, ZonedDateTime.now(ZoneOffset.UTC));
model.put("upTime", diff.getSeconds());
val runtime = Runtime.getRuntime();
model.put("total... | [
"@",
"ReadOperation",
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"handle",
"(",
")",
"{",
"val",
"model",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"val",
"diff",
"=",
"Duration",
".",
"between",
"(",
"this",
... | Gets availability times of the server.
@return the availability | [
"Gets",
"availability",
"times",
"of",
"the",
"server",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-reports-core/src/main/java/org/apereo/cas/web/report/StatisticsEndpoint.java#L41-L83 |
126,391 | apereo/cas | core/cas-server-core-audit-api/src/main/java/org/apereo/cas/audit/spi/resource/CredentialsAsFirstParameterResourceResolver.java | CredentialsAsFirstParameterResourceResolver.toResources | private static String[] toResources(final Object[] args) {
val object = args[0];
if (object instanceof AuthenticationTransaction) {
val transaction = AuthenticationTransaction.class.cast(object);
return new String[]{SUPPLIED_CREDENTIALS + transaction.getCredentials()};
}
... | java | private static String[] toResources(final Object[] args) {
val object = args[0];
if (object instanceof AuthenticationTransaction) {
val transaction = AuthenticationTransaction.class.cast(object);
return new String[]{SUPPLIED_CREDENTIALS + transaction.getCredentials()};
}
... | [
"private",
"static",
"String",
"[",
"]",
"toResources",
"(",
"final",
"Object",
"[",
"]",
"args",
")",
"{",
"val",
"object",
"=",
"args",
"[",
"0",
"]",
";",
"if",
"(",
"object",
"instanceof",
"AuthenticationTransaction",
")",
"{",
"val",
"transaction",
... | Turn the arguments into a list.
@param args the args
@return the string[] | [
"Turn",
"the",
"arguments",
"into",
"a",
"list",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-audit-api/src/main/java/org/apereo/cas/audit/spi/resource/CredentialsAsFirstParameterResourceResolver.java#L27-L34 |
126,392 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/RandomUtils.java | RandomUtils.getNativeInstance | public static SecureRandom getNativeInstance() {
try {
return SecureRandom.getInstance(NATIVE_NON_BLOCKING_ALGORITHM);
} catch (final NoSuchAlgorithmException e) {
LOGGER.trace(e.getMessage(), e);
return new SecureRandom();
}
} | java | public static SecureRandom getNativeInstance() {
try {
return SecureRandom.getInstance(NATIVE_NON_BLOCKING_ALGORITHM);
} catch (final NoSuchAlgorithmException e) {
LOGGER.trace(e.getMessage(), e);
return new SecureRandom();
}
} | [
"public",
"static",
"SecureRandom",
"getNativeInstance",
"(",
")",
"{",
"try",
"{",
"return",
"SecureRandom",
".",
"getInstance",
"(",
"NATIVE_NON_BLOCKING_ALGORITHM",
")",
";",
"}",
"catch",
"(",
"final",
"NoSuchAlgorithmException",
"e",
")",
"{",
"LOGGER",
".",
... | Get strong enough SecureRandom instance and of the checked exception.
@return the strong instance | [
"Get",
"strong",
"enough",
"SecureRandom",
"instance",
"and",
"of",
"the",
"checked",
"exception",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/RandomUtils.java#L33-L40 |
126,393 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/RandomUtils.java | RandomUtils.generateSecureRandomId | public static String generateSecureRandomId() {
val generator = getNativeInstance();
val charMappings = new char[]{
'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p'};
val bytes = new byte[SECURE_ID_BYTES_LENGTH];
generato... | java | public static String generateSecureRandomId() {
val generator = getNativeInstance();
val charMappings = new char[]{
'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p'};
val bytes = new byte[SECURE_ID_BYTES_LENGTH];
generato... | [
"public",
"static",
"String",
"generateSecureRandomId",
"(",
")",
"{",
"val",
"generator",
"=",
"getNativeInstance",
"(",
")",
";",
"val",
"charMappings",
"=",
"new",
"char",
"[",
"]",
"{",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
",",
... | Generate secure random id string.
@return the string | [
"Generate",
"secure",
"random",
"id",
"string",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/RandomUtils.java#L56-L74 |
126,394 | apereo/cas | support/cas-server-support-swivel-core/src/main/java/org/apereo/cas/adaptors/swivel/SwivelMultifactorAuthenticationProvider.java | SwivelMultifactorAuthenticationProvider.canPing | public boolean canPing() {
try {
val connection = (HttpURLConnection) new URL(this.swivelUrl).openConnection();
connection.setRequestMethod(HttpMethod.GET.name());
connection.connect();
return connection.getResponseCode() == HttpStatus.SC_OK;
} catch (fina... | java | public boolean canPing() {
try {
val connection = (HttpURLConnection) new URL(this.swivelUrl).openConnection();
connection.setRequestMethod(HttpMethod.GET.name());
connection.connect();
return connection.getResponseCode() == HttpStatus.SC_OK;
} catch (fina... | [
"public",
"boolean",
"canPing",
"(",
")",
"{",
"try",
"{",
"val",
"connection",
"=",
"(",
"HttpURLConnection",
")",
"new",
"URL",
"(",
"this",
".",
"swivelUrl",
")",
".",
"openConnection",
"(",
")",
";",
"connection",
".",
"setRequestMethod",
"(",
"HttpMet... | Can ping provider?
@return the boolean | [
"Can",
"ping",
"provider?"
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-swivel-core/src/main/java/org/apereo/cas/adaptors/swivel/SwivelMultifactorAuthenticationProvider.java#L53-L63 |
126,395 | apereo/cas | support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java | DelegatedClientFactory.configureGitHubClient | protected void configureGitHubClient(final Collection<BaseClient> properties) {
val github = pac4jProperties.getGithub();
if (StringUtils.isNotBlank(github.getId()) && StringUtils.isNotBlank(github.getSecret())) {
val client = new GitHubClient(github.getId(), github.getSecret());
... | java | protected void configureGitHubClient(final Collection<BaseClient> properties) {
val github = pac4jProperties.getGithub();
if (StringUtils.isNotBlank(github.getId()) && StringUtils.isNotBlank(github.getSecret())) {
val client = new GitHubClient(github.getId(), github.getSecret());
... | [
"protected",
"void",
"configureGitHubClient",
"(",
"final",
"Collection",
"<",
"BaseClient",
">",
"properties",
")",
"{",
"val",
"github",
"=",
"pac4jProperties",
".",
"getGithub",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"github",
".",... | Configure github client.
@param properties the properties | [
"Configure",
"github",
"client",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java#L87-L96 |
126,396 | apereo/cas | support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java | DelegatedClientFactory.configureDropBoxClient | protected void configureDropBoxClient(final Collection<BaseClient> properties) {
val db = pac4jProperties.getDropbox();
if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
val client = new DropBoxClient(db.getId(), db.getSecret());
configureClient(... | java | protected void configureDropBoxClient(final Collection<BaseClient> properties) {
val db = pac4jProperties.getDropbox();
if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
val client = new DropBoxClient(db.getId(), db.getSecret());
configureClient(... | [
"protected",
"void",
"configureDropBoxClient",
"(",
"final",
"Collection",
"<",
"BaseClient",
">",
"properties",
")",
"{",
"val",
"db",
"=",
"pac4jProperties",
".",
"getDropbox",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"db",
".",
"ge... | Configure dropbox client.
@param properties the properties | [
"Configure",
"dropbox",
"client",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java#L103-L111 |
126,397 | apereo/cas | support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java | DelegatedClientFactory.configureOrcidClient | protected void configureOrcidClient(final Collection<BaseClient> properties) {
val db = pac4jProperties.getOrcid();
if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
val client = new OrcidClient(db.getId(), db.getSecret());
configureClient(client... | java | protected void configureOrcidClient(final Collection<BaseClient> properties) {
val db = pac4jProperties.getOrcid();
if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
val client = new OrcidClient(db.getId(), db.getSecret());
configureClient(client... | [
"protected",
"void",
"configureOrcidClient",
"(",
"final",
"Collection",
"<",
"BaseClient",
">",
"properties",
")",
"{",
"val",
"db",
"=",
"pac4jProperties",
".",
"getOrcid",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"db",
".",
"getId"... | Configure orcid client.
@param properties the properties | [
"Configure",
"orcid",
"client",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java#L118-L127 |
126,398 | apereo/cas | support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java | DelegatedClientFactory.configureWindowsLiveClient | protected void configureWindowsLiveClient(final Collection<BaseClient> properties) {
val live = pac4jProperties.getWindowsLive();
if (StringUtils.isNotBlank(live.getId()) && StringUtils.isNotBlank(live.getSecret())) {
val client = new WindowsLiveClient(live.getId(), live.getSecret());
... | java | protected void configureWindowsLiveClient(final Collection<BaseClient> properties) {
val live = pac4jProperties.getWindowsLive();
if (StringUtils.isNotBlank(live.getId()) && StringUtils.isNotBlank(live.getSecret())) {
val client = new WindowsLiveClient(live.getId(), live.getSecret());
... | [
"protected",
"void",
"configureWindowsLiveClient",
"(",
"final",
"Collection",
"<",
"BaseClient",
">",
"properties",
")",
"{",
"val",
"live",
"=",
"pac4jProperties",
".",
"getWindowsLive",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"live",
... | Configure windows live client.
@param properties the properties | [
"Configure",
"windows",
"live",
"client",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java#L134-L143 |
126,399 | apereo/cas | support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java | DelegatedClientFactory.configureYahooClient | protected void configureYahooClient(final Collection<BaseClient> properties) {
val yahoo = pac4jProperties.getYahoo();
if (StringUtils.isNotBlank(yahoo.getId()) && StringUtils.isNotBlank(yahoo.getSecret())) {
val client = new YahooClient(yahoo.getId(), yahoo.getSecret());
configu... | java | protected void configureYahooClient(final Collection<BaseClient> properties) {
val yahoo = pac4jProperties.getYahoo();
if (StringUtils.isNotBlank(yahoo.getId()) && StringUtils.isNotBlank(yahoo.getSecret())) {
val client = new YahooClient(yahoo.getId(), yahoo.getSecret());
configu... | [
"protected",
"void",
"configureYahooClient",
"(",
"final",
"Collection",
"<",
"BaseClient",
">",
"properties",
")",
"{",
"val",
"yahoo",
"=",
"pac4jProperties",
".",
"getYahoo",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"yahoo",
".",
"... | Configure yahoo client.
@param properties the properties | [
"Configure",
"yahoo",
"client",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/DelegatedClientFactory.java#L150-L159 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.