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,800 | apereo/cas | support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java | BaseSamlRegisteredServiceMetadataResolver.configureAndInitializeSingleMetadataResolver | protected void configureAndInitializeSingleMetadataResolver(final AbstractMetadataResolver metadataProvider,
final SamlRegisteredService service,
final List<MetadataFilter> metadataFilterList)... | java | protected void configureAndInitializeSingleMetadataResolver(final AbstractMetadataResolver metadataProvider,
final SamlRegisteredService service,
final List<MetadataFilter> metadataFilterList)... | [
"protected",
"void",
"configureAndInitializeSingleMetadataResolver",
"(",
"final",
"AbstractMetadataResolver",
"metadataProvider",
",",
"final",
"SamlRegisteredService",
"service",
",",
"final",
"List",
"<",
"MetadataFilter",
">",
"metadataFilterList",
")",
"throws",
"Excepti... | Build single metadata resolver metadata resolver.
@param metadataProvider the metadata provider
@param service the service
@param metadataFilterList the metadata filter list
@throws Exception the exception | [
"Build",
"single",
"metadata",
"resolver",
"metadata",
"resolver",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java#L127-L141 |
126,801 | apereo/cas | support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java | BaseSamlRegisteredServiceMetadataResolver.configureAndInitializeSingleMetadataResolver | protected void configureAndInitializeSingleMetadataResolver(final AbstractMetadataResolver metadataProvider,
final SamlRegisteredService service) throws Exception {
configureAndInitializeSingleMetadataResolver(metadataProvider, service, new ArrayLi... | java | protected void configureAndInitializeSingleMetadataResolver(final AbstractMetadataResolver metadataProvider,
final SamlRegisteredService service) throws Exception {
configureAndInitializeSingleMetadataResolver(metadataProvider, service, new ArrayLi... | [
"protected",
"void",
"configureAndInitializeSingleMetadataResolver",
"(",
"final",
"AbstractMetadataResolver",
"metadataProvider",
",",
"final",
"SamlRegisteredService",
"service",
")",
"throws",
"Exception",
"{",
"configureAndInitializeSingleMetadataResolver",
"(",
"metadataProvid... | Configure and initialize single metadata resolver.
@param metadataProvider the metadata provider
@param service the service
@throws Exception the exception | [
"Configure",
"and",
"initialize",
"single",
"metadata",
"resolver",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java#L150-L153 |
126,802 | apereo/cas | support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java | BaseSamlRegisteredServiceMetadataResolver.buildMetadataFilters | protected void buildMetadataFilters(final SamlRegisteredService service, final AbstractMetadataResolver metadataProvider,
final List<MetadataFilter> metadataFilterList) throws Exception {
buildRequiredValidUntilFilterIfNeeded(service, metadataFilterList);
buildSig... | java | protected void buildMetadataFilters(final SamlRegisteredService service, final AbstractMetadataResolver metadataProvider,
final List<MetadataFilter> metadataFilterList) throws Exception {
buildRequiredValidUntilFilterIfNeeded(service, metadataFilterList);
buildSig... | [
"protected",
"void",
"buildMetadataFilters",
"(",
"final",
"SamlRegisteredService",
"service",
",",
"final",
"AbstractMetadataResolver",
"metadataProvider",
",",
"final",
"List",
"<",
"MetadataFilter",
">",
"metadataFilterList",
")",
"throws",
"Exception",
"{",
"buildRequ... | Build metadata filters.
@param service the service
@param metadataProvider the metadata provider
@param metadataFilterList the metadata filter list
@throws Exception the exception | [
"Build",
"metadata",
"filters",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java#L163-L174 |
126,803 | apereo/cas | support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/conditions/SamlProfileSamlConditionsBuilder.java | SamlProfileSamlConditionsBuilder.buildConditions | protected Conditions buildConditions(final RequestAbstractType authnRequest,
final Object assertion, final SamlRegisteredService service,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
... | java | protected Conditions buildConditions(final RequestAbstractType authnRequest,
final Object assertion, final SamlRegisteredService service,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
... | [
"protected",
"Conditions",
"buildConditions",
"(",
"final",
"RequestAbstractType",
"authnRequest",
",",
"final",
"Object",
"assertion",
",",
"final",
"SamlRegisteredService",
"service",
",",
"final",
"SamlRegisteredServiceServiceProviderMetadataFacade",
"adaptor",
",",
"final... | Build conditions conditions.
@param authnRequest the authn request
@param assertion the assertion
@param service the service
@param adaptor the adaptor
@param messageContext the message context
@return the conditions
@throws SamlException the saml exception | [
"Build",
"conditions",
"conditions",
"."
] | 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/conditions/SamlProfileSamlConditionsBuilder.java#L60-L80 |
126,804 | apereo/cas | support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java | CloudDirectoryUtils.getAttributeKeyValueByName | public static AttributeKeyAndValue getAttributeKeyValueByName(final ListObjectAttributesResult attributesResult,
final String attributeName) {
return attributesResult.getAttributes().stream()
.filter(a -> a.getKey().getName().equalsIg... | java | public static AttributeKeyAndValue getAttributeKeyValueByName(final ListObjectAttributesResult attributesResult,
final String attributeName) {
return attributesResult.getAttributes().stream()
.filter(a -> a.getKey().getName().equalsIg... | [
"public",
"static",
"AttributeKeyAndValue",
"getAttributeKeyValueByName",
"(",
"final",
"ListObjectAttributesResult",
"attributesResult",
",",
"final",
"String",
"attributeName",
")",
"{",
"return",
"attributesResult",
".",
"getAttributes",
"(",
")",
".",
"stream",
"(",
... | Gets attribute key value by name.
@param attributesResult the attributes result
@param attributeName the attribute name
@return the attribute key value by name | [
"Gets",
"attribute",
"key",
"value",
"by",
"name",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java#L34-L40 |
126,805 | apereo/cas | support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java | CloudDirectoryUtils.getListObjectAttributesRequest | public static ListObjectAttributesRequest getListObjectAttributesRequest(final String arnName,
final String objectId) {
return new ListObjectAttributesRequest()
.withDirectoryArn(arnName)
.withObjectReference(ge... | java | public static ListObjectAttributesRequest getListObjectAttributesRequest(final String arnName,
final String objectId) {
return new ListObjectAttributesRequest()
.withDirectoryArn(arnName)
.withObjectReference(ge... | [
"public",
"static",
"ListObjectAttributesRequest",
"getListObjectAttributesRequest",
"(",
"final",
"String",
"arnName",
",",
"final",
"String",
"objectId",
")",
"{",
"return",
"new",
"ListObjectAttributesRequest",
"(",
")",
".",
"withDirectoryArn",
"(",
"arnName",
")",
... | Gets list object attributes request.
@param arnName the arn name
@param objectId the object id
@return the list object attributes request | [
"Gets",
"list",
"object",
"attributes",
"request",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java#L49-L54 |
126,806 | apereo/cas | support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java | CloudDirectoryUtils.getObjectRefByPath | public static ObjectReference getObjectRefByPath(final String path) {
if (path == null) {
return null;
}
return new ObjectReference().withSelector(path);
} | java | public static ObjectReference getObjectRefByPath(final String path) {
if (path == null) {
return null;
}
return new ObjectReference().withSelector(path);
} | [
"public",
"static",
"ObjectReference",
"getObjectRefByPath",
"(",
"final",
"String",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"ObjectReference",
"(",
")",
".",
"withSelector",
"(",
"path",
")... | Gets object ref by path.
@param path the path
@return the object ref by path | [
"Gets",
"object",
"ref",
"by",
"path",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java#L63-L68 |
126,807 | apereo/cas | support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java | CloudDirectoryUtils.getListIndexRequest | public static ListIndexRequest getListIndexRequest(final String attributeName,
final String attributeValue,
final ObjectReference reference,
final CloudDir... | java | public static ListIndexRequest getListIndexRequest(final String attributeName,
final String attributeValue,
final ObjectReference reference,
final CloudDir... | [
"public",
"static",
"ListIndexRequest",
"getListIndexRequest",
"(",
"final",
"String",
"attributeName",
",",
"final",
"String",
"attributeValue",
",",
"final",
"ObjectReference",
"reference",
",",
"final",
"CloudDirectoryProperties",
"cloud",
")",
"{",
"val",
"range",
... | Gets list index request.
@param attributeName the attribute name
@param attributeValue the attribute value
@param reference the reference
@param cloud the cloud
@return the list index request | [
"Gets",
"list",
"index",
"request",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java#L89-L99 |
126,808 | apereo/cas | support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java | CloudDirectoryUtils.getObjectAttributeRanges | public static ObjectAttributeRange getObjectAttributeRanges(final String schemaArn, final String facetName,
final String attributeName, final String attributeValue) {
val attributeKey = getAttributeKey(schemaArn, facetName, attributeName);
... | java | public static ObjectAttributeRange getObjectAttributeRanges(final String schemaArn, final String facetName,
final String attributeName, final String attributeValue) {
val attributeKey = getAttributeKey(schemaArn, facetName, attributeName);
... | [
"public",
"static",
"ObjectAttributeRange",
"getObjectAttributeRanges",
"(",
"final",
"String",
"schemaArn",
",",
"final",
"String",
"facetName",
",",
"final",
"String",
"attributeName",
",",
"final",
"String",
"attributeValue",
")",
"{",
"val",
"attributeKey",
"=",
... | Gets object attribute ranges.
@param schemaArn the schema arn
@param facetName the facet name
@param attributeName the attribute name
@param attributeValue the attribute value
@return the object attribute ranges | [
"Gets",
"object",
"attribute",
"ranges",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java#L110-L120 |
126,809 | apereo/cas | support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java | CloudDirectoryUtils.getAttributeKey | private static AttributeKey getAttributeKey(final String schemaArn, final String facetName, final String attributeName) {
return new AttributeKey().withFacetName(facetName).withSchemaArn(schemaArn).withName(attributeName);
} | java | private static AttributeKey getAttributeKey(final String schemaArn, final String facetName, final String attributeName) {
return new AttributeKey().withFacetName(facetName).withSchemaArn(schemaArn).withName(attributeName);
} | [
"private",
"static",
"AttributeKey",
"getAttributeKey",
"(",
"final",
"String",
"schemaArn",
",",
"final",
"String",
"facetName",
",",
"final",
"String",
"attributeName",
")",
"{",
"return",
"new",
"AttributeKey",
"(",
")",
".",
"withFacetName",
"(",
"facetName",
... | Gets attribute key.
@param schemaArn the schema arn
@param facetName the facet name
@param attributeName the attribute name
@return the attribute key | [
"Gets",
"attribute",
"key",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java#L130-L132 |
126,810 | apereo/cas | core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/DefaultTicketRegistryCleaner.java | DefaultTicketRegistryCleaner.cleanInternal | protected int cleanInternal() {
try (val expiredTickets = ticketRegistry.getTicketsStream().filter(Ticket::isExpired)) {
val ticketsDeleted = expiredTickets
.mapToInt(this::cleanTicket)
.sum();
LOGGER.info("[{}] expired tickets removed.", ticketsDeleted);
... | java | protected int cleanInternal() {
try (val expiredTickets = ticketRegistry.getTicketsStream().filter(Ticket::isExpired)) {
val ticketsDeleted = expiredTickets
.mapToInt(this::cleanTicket)
.sum();
LOGGER.info("[{}] expired tickets removed.", ticketsDeleted);
... | [
"protected",
"int",
"cleanInternal",
"(",
")",
"{",
"try",
"(",
"val",
"expiredTickets",
"=",
"ticketRegistry",
".",
"getTicketsStream",
"(",
")",
".",
"filter",
"(",
"Ticket",
"::",
"isExpired",
")",
")",
"{",
"val",
"ticketsDeleted",
"=",
"expiredTickets",
... | Clean tickets.
@return the int | [
"Clean",
"tickets",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/DefaultTicketRegistryCleaner.java#L61-L69 |
126,811 | apereo/cas | support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/UrlResourceMetadataResolver.java | UrlResourceMetadataResolver.getMetadataResolverFromResponse | protected AbstractMetadataResolver getMetadataResolverFromResponse(final HttpResponse response, final File backupFile) throws Exception {
val entity = response.getEntity();
val result = IOUtils.toString(entity.getContent(), StandardCharsets.UTF_8);
val path = backupFile.toPath();
LOGGER.... | java | protected AbstractMetadataResolver getMetadataResolverFromResponse(final HttpResponse response, final File backupFile) throws Exception {
val entity = response.getEntity();
val result = IOUtils.toString(entity.getContent(), StandardCharsets.UTF_8);
val path = backupFile.toPath();
LOGGER.... | [
"protected",
"AbstractMetadataResolver",
"getMetadataResolverFromResponse",
"(",
"final",
"HttpResponse",
"response",
",",
"final",
"File",
"backupFile",
")",
"throws",
"Exception",
"{",
"val",
"entity",
"=",
"response",
".",
"getEntity",
"(",
")",
";",
"val",
"resu... | Gets metadata resolver from response.
@param response the response
@param backupFile the backup file
@return the metadata resolver from response
@throws Exception the exception | [
"Gets",
"metadata",
"resolver",
"from",
"response",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/UrlResourceMetadataResolver.java#L126-L137 |
126,812 | apereo/cas | support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/UrlResourceMetadataResolver.java | UrlResourceMetadataResolver.fetchMetadata | protected HttpResponse fetchMetadata(final String metadataLocation, final CriteriaSet criteriaSet) {
LOGGER.debug("Fetching metadata from [{}]", metadataLocation);
return HttpUtils.executeGet(metadataLocation, new LinkedHashMap<>());
} | java | protected HttpResponse fetchMetadata(final String metadataLocation, final CriteriaSet criteriaSet) {
LOGGER.debug("Fetching metadata from [{}]", metadataLocation);
return HttpUtils.executeGet(metadataLocation, new LinkedHashMap<>());
} | [
"protected",
"HttpResponse",
"fetchMetadata",
"(",
"final",
"String",
"metadataLocation",
",",
"final",
"CriteriaSet",
"criteriaSet",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Fetching metadata from [{}]\"",
",",
"metadataLocation",
")",
";",
"return",
"HttpUtils",
".... | Fetch metadata http response.
@param metadataLocation the metadata location
@param criteriaSet the criteria set
@return the http response | [
"Fetch",
"metadata",
"http",
"response",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/UrlResourceMetadataResolver.java#L146-L149 |
126,813 | apereo/cas | support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/UrlResourceMetadataResolver.java | UrlResourceMetadataResolver.getMetadataBackupFile | protected File getMetadataBackupFile(final AbstractResource metadataResource,
final SamlRegisteredService service) throws IOException {
LOGGER.debug("Metadata backup directory is at [{}]", this.metadataBackupDirectory.getCanonicalPath());
val metadataFileName = ... | java | protected File getMetadataBackupFile(final AbstractResource metadataResource,
final SamlRegisteredService service) throws IOException {
LOGGER.debug("Metadata backup directory is at [{}]", this.metadataBackupDirectory.getCanonicalPath());
val metadataFileName = ... | [
"protected",
"File",
"getMetadataBackupFile",
"(",
"final",
"AbstractResource",
"metadataResource",
",",
"final",
"SamlRegisteredService",
"service",
")",
"throws",
"IOException",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Metadata backup directory is at [{}]\"",
",",
"this",
"... | Gets metadata backup file.
@param metadataResource the metadata resource
@param service the service
@return the metadata backup file
@throws IOException the io exception | [
"Gets",
"metadata",
"backup",
"file",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/UrlResourceMetadataResolver.java#L186-L198 |
126,814 | apereo/cas | support/cas-server-support-ws-sts-api/src/main/java/org/apereo/cas/authentication/SecurityTokenServiceClientBuilder.java | SecurityTokenServiceClientBuilder.buildClientForSecurityTokenRequests | public SecurityTokenServiceClient buildClientForSecurityTokenRequests(final WSFederationRegisteredService service) {
val cxfBus = BusFactory.getDefaultBus();
val sts = new SecurityTokenServiceClient(cxfBus);
sts.setAddressingNamespace(StringUtils.defaultIfBlank(service.getAddressingNamespace(), ... | java | public SecurityTokenServiceClient buildClientForSecurityTokenRequests(final WSFederationRegisteredService service) {
val cxfBus = BusFactory.getDefaultBus();
val sts = new SecurityTokenServiceClient(cxfBus);
sts.setAddressingNamespace(StringUtils.defaultIfBlank(service.getAddressingNamespace(), ... | [
"public",
"SecurityTokenServiceClient",
"buildClientForSecurityTokenRequests",
"(",
"final",
"WSFederationRegisteredService",
"service",
")",
"{",
"val",
"cxfBus",
"=",
"BusFactory",
".",
"getDefaultBus",
"(",
")",
";",
"val",
"sts",
"=",
"new",
"SecurityTokenServiceClien... | Build client for security token requests.
@param service the rp
@return the security token service client | [
"Build",
"client",
"for",
"security",
"token",
"requests",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ws-sts-api/src/main/java/org/apereo/cas/authentication/SecurityTokenServiceClientBuilder.java#L34-L49 |
126,815 | apereo/cas | support/cas-server-support-ws-sts-api/src/main/java/org/apereo/cas/authentication/SecurityTokenServiceClientBuilder.java | SecurityTokenServiceClientBuilder.buildClientForRelyingPartyTokenResponses | public SecurityTokenServiceClient buildClientForRelyingPartyTokenResponses(final SecurityToken securityToken,
final WSFederationRegisteredService service) {
val cxfBus = BusFactory.getDefaultBus();
val sts = new SecurityToken... | java | public SecurityTokenServiceClient buildClientForRelyingPartyTokenResponses(final SecurityToken securityToken,
final WSFederationRegisteredService service) {
val cxfBus = BusFactory.getDefaultBus();
val sts = new SecurityToken... | [
"public",
"SecurityTokenServiceClient",
"buildClientForRelyingPartyTokenResponses",
"(",
"final",
"SecurityToken",
"securityToken",
",",
"final",
"WSFederationRegisteredService",
"service",
")",
"{",
"val",
"cxfBus",
"=",
"BusFactory",
".",
"getDefaultBus",
"(",
")",
";",
... | Build client for relying party token responses.
@param securityToken the security token
@param service the service
@return the security token service client | [
"Build",
"client",
"for",
"relying",
"party",
"token",
"responses",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ws-sts-api/src/main/java/org/apereo/cas/authentication/SecurityTokenServiceClientBuilder.java#L66-L85 |
126,816 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/authenticator/OAuth20UsernamePasswordAuthenticator.java | OAuth20UsernamePasswordAuthenticator.getClientIdAndClientSecret | protected Pair<String, String> getClientIdAndClientSecret(final WebContext context) {
val extractor = new BasicAuthExtractor();
val upc = extractor.extract(context);
if (upc != null) {
return Pair.of(upc.getUsername(), upc.getPassword());
}
val clientId = context.getR... | java | protected Pair<String, String> getClientIdAndClientSecret(final WebContext context) {
val extractor = new BasicAuthExtractor();
val upc = extractor.extract(context);
if (upc != null) {
return Pair.of(upc.getUsername(), upc.getPassword());
}
val clientId = context.getR... | [
"protected",
"Pair",
"<",
"String",
",",
"String",
">",
"getClientIdAndClientSecret",
"(",
"final",
"WebContext",
"context",
")",
"{",
"val",
"extractor",
"=",
"new",
"BasicAuthExtractor",
"(",
")",
";",
"val",
"upc",
"=",
"extractor",
".",
"extract",
"(",
"... | Gets client id and client secret.
@param context the context
@return the client id and client secret | [
"Gets",
"client",
"id",
"and",
"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/authenticator/OAuth20UsernamePasswordAuthenticator.java#L88-L97 |
126,817 | apereo/cas | core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java | AbstractWebApplicationServiceResponseBuilder.buildRedirect | protected Response buildRedirect(final WebApplicationService service, final Map<String, String> parameters) {
return DefaultResponse.getRedirectResponse(service.getOriginalUrl(), parameters);
} | java | protected Response buildRedirect(final WebApplicationService service, final Map<String, String> parameters) {
return DefaultResponse.getRedirectResponse(service.getOriginalUrl(), parameters);
} | [
"protected",
"Response",
"buildRedirect",
"(",
"final",
"WebApplicationService",
"service",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"{",
"return",
"DefaultResponse",
".",
"getRedirectResponse",
"(",
"service",
".",
"getOriginalUrl"... | Build redirect.
@param service the service
@param parameters the parameters
@return the response | [
"Build",
"redirect",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java#L44-L46 |
126,818 | apereo/cas | core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java | AbstractWebApplicationServiceResponseBuilder.buildHeader | protected Response buildHeader(final WebApplicationService service, final Map<String, String> parameters) {
return DefaultResponse.getHeaderResponse(service.getOriginalUrl(), parameters);
} | java | protected Response buildHeader(final WebApplicationService service, final Map<String, String> parameters) {
return DefaultResponse.getHeaderResponse(service.getOriginalUrl(), parameters);
} | [
"protected",
"Response",
"buildHeader",
"(",
"final",
"WebApplicationService",
"service",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"{",
"return",
"DefaultResponse",
".",
"getHeaderResponse",
"(",
"service",
".",
"getOriginalUrl",
... | Build header response.
@param service the service
@param parameters the parameters
@return the response | [
"Build",
"header",
"response",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java#L55-L57 |
126,819 | apereo/cas | core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java | AbstractWebApplicationServiceResponseBuilder.buildPost | protected Response buildPost(final WebApplicationService service, final Map<String, String> parameters) {
return DefaultResponse.getPostResponse(service.getOriginalUrl(), parameters);
} | java | protected Response buildPost(final WebApplicationService service, final Map<String, String> parameters) {
return DefaultResponse.getPostResponse(service.getOriginalUrl(), parameters);
} | [
"protected",
"Response",
"buildPost",
"(",
"final",
"WebApplicationService",
"service",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"{",
"return",
"DefaultResponse",
".",
"getPostResponse",
"(",
"service",
".",
"getOriginalUrl",
"(",... | Build post.
@param service the service
@param parameters the parameters
@return the response | [
"Build",
"post",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java#L66-L68 |
126,820 | apereo/cas | core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java | AbstractWebApplicationServiceResponseBuilder.getWebApplicationServiceResponseType | protected Response.ResponseType getWebApplicationServiceResponseType(final WebApplicationService finalService) {
val request = HttpRequestUtils.getHttpServletRequestFromRequestAttributes();
val methodRequest = request != null ? request.getParameter(CasProtocolConstants.PARAMETER_METHOD) : null;
... | java | protected Response.ResponseType getWebApplicationServiceResponseType(final WebApplicationService finalService) {
val request = HttpRequestUtils.getHttpServletRequestFromRequestAttributes();
val methodRequest = request != null ? request.getParameter(CasProtocolConstants.PARAMETER_METHOD) : null;
... | [
"protected",
"Response",
".",
"ResponseType",
"getWebApplicationServiceResponseType",
"(",
"final",
"WebApplicationService",
"finalService",
")",
"{",
"val",
"request",
"=",
"HttpRequestUtils",
".",
"getHttpServletRequestFromRequestAttributes",
"(",
")",
";",
"val",
"method... | Determine response type response.
@param finalService the final service
@return the response type | [
"Determine",
"response",
"type",
"response",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/AbstractWebApplicationServiceResponseBuilder.java#L76-L94 |
126,821 | apereo/cas | core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/InMemoryServiceRegistry.java | InMemoryServiceRegistry.findHighestId | private long findHighestId() {
return this.registeredServices.stream().map(RegisteredService::getId).max(Comparator.naturalOrder()).orElse(0L);
} | java | private long findHighestId() {
return this.registeredServices.stream().map(RegisteredService::getId).max(Comparator.naturalOrder()).orElse(0L);
} | [
"private",
"long",
"findHighestId",
"(",
")",
"{",
"return",
"this",
".",
"registeredServices",
".",
"stream",
"(",
")",
".",
"map",
"(",
"RegisteredService",
"::",
"getId",
")",
".",
"max",
"(",
"Comparator",
".",
"naturalOrder",
"(",
")",
")",
".",
"or... | This isn't super-fast but we don't expect thousands of services.
@return the highest service id in the list of registered services | [
"This",
"isn",
"t",
"super",
"-",
"fast",
"but",
"we",
"don",
"t",
"expect",
"thousands",
"of",
"services",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/InMemoryServiceRegistry.java#L78-L80 |
126,822 | apereo/cas | support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientNavigationController.java | DelegatedClientNavigationController.redirectResponseToFlow | @RequestMapping(value = ENDPOINT_RESPONSE, method = {RequestMethod.GET, RequestMethod.POST})
public View redirectResponseToFlow(@PathVariable("clientName") final String clientName,
final HttpServletRequest request, final HttpServletResponse response) {
return buildRedi... | java | @RequestMapping(value = ENDPOINT_RESPONSE, method = {RequestMethod.GET, RequestMethod.POST})
public View redirectResponseToFlow(@PathVariable("clientName") final String clientName,
final HttpServletRequest request, final HttpServletResponse response) {
return buildRedi... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"ENDPOINT_RESPONSE",
",",
"method",
"=",
"{",
"RequestMethod",
".",
"GET",
",",
"RequestMethod",
".",
"POST",
"}",
")",
"public",
"View",
"redirectResponseToFlow",
"(",
"@",
"PathVariable",
"(",
"\"clientName\"",
")",
... | Redirect response to flow. Receives the CAS, OAuth, OIDC, etc. callback response, adjust it to work with
the login webflow, and redirects the requests to the login webflow endpoint.
@param clientName the path-based parameter that provider the pac4j client name
@param request the request
@param response the respon... | [
"Redirect",
"response",
"to",
"flow",
".",
"Receives",
"the",
"CAS",
"OAuth",
"OIDC",
"etc",
".",
"callback",
"response",
"adjust",
"it",
"to",
"work",
"with",
"the",
"login",
"webflow",
"and",
"redirects",
"the",
"requests",
"to",
"the",
"login",
"webflow",... | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientNavigationController.java#L106-L110 |
126,823 | apereo/cas | support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientNavigationController.java | DelegatedClientNavigationController.buildRedirectViewBackToFlow | @SneakyThrows
protected View buildRedirectViewBackToFlow(final String clientName, final HttpServletRequest request) {
val urlBuilder = new URIBuilder(String.valueOf(request.getRequestURL()));
request.getParameterMap().forEach((k, v) -> {
val value = request.getParameter(k);
... | java | @SneakyThrows
protected View buildRedirectViewBackToFlow(final String clientName, final HttpServletRequest request) {
val urlBuilder = new URIBuilder(String.valueOf(request.getRequestURL()));
request.getParameterMap().forEach((k, v) -> {
val value = request.getParameter(k);
... | [
"@",
"SneakyThrows",
"protected",
"View",
"buildRedirectViewBackToFlow",
"(",
"final",
"String",
"clientName",
",",
"final",
"HttpServletRequest",
"request",
")",
"{",
"val",
"urlBuilder",
"=",
"new",
"URIBuilder",
"(",
"String",
".",
"valueOf",
"(",
"request",
".... | Build redirect view back to flow view.
@param clientName the client name
@param request the request
@return the view | [
"Build",
"redirect",
"view",
"back",
"to",
"flow",
"view",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientNavigationController.java#L119-L134 |
126,824 | apereo/cas | support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientNavigationController.java | DelegatedClientNavigationController.getResultingView | @SneakyThrows
protected View getResultingView(final IndirectClient<Credentials, CommonProfile> client, final J2EContext webContext, final Ticket ticket) {
val action = client.getRedirectAction(webContext);
if (RedirectAction.RedirectType.SUCCESS.equals(action.getType())) {
return new Dyn... | java | @SneakyThrows
protected View getResultingView(final IndirectClient<Credentials, CommonProfile> client, final J2EContext webContext, final Ticket ticket) {
val action = client.getRedirectAction(webContext);
if (RedirectAction.RedirectType.SUCCESS.equals(action.getType())) {
return new Dyn... | [
"@",
"SneakyThrows",
"protected",
"View",
"getResultingView",
"(",
"final",
"IndirectClient",
"<",
"Credentials",
",",
"CommonProfile",
">",
"client",
",",
"final",
"J2EContext",
"webContext",
",",
"final",
"Ticket",
"ticket",
")",
"{",
"val",
"action",
"=",
"cl... | Gets resulting view.
@param client the client
@param webContext the web context
@param ticket the ticket
@return the resulting view | [
"Gets",
"resulting",
"view",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientNavigationController.java#L144-L154 |
126,825 | apereo/cas | support/cas-server-support-yubikey-core/src/main/java/org/apereo/cas/adaptors/yubikey/registry/YubiKeyAccountRegistryEndpoint.java | YubiKeyAccountRegistryEndpoint.get | @ReadOperation
public YubiKeyAccount get(@Selector final String username) {
val result = registry.getAccount(username);
return result.orElse(null);
} | java | @ReadOperation
public YubiKeyAccount get(@Selector final String username) {
val result = registry.getAccount(username);
return result.orElse(null);
} | [
"@",
"ReadOperation",
"public",
"YubiKeyAccount",
"get",
"(",
"@",
"Selector",
"final",
"String",
"username",
")",
"{",
"val",
"result",
"=",
"registry",
".",
"getAccount",
"(",
"username",
")",
";",
"return",
"result",
".",
"orElse",
"(",
"null",
")",
";"... | Get yubi key account.
@param username the username
@return the yubi key account | [
"Get",
"yubi",
"key",
"account",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-yubikey-core/src/main/java/org/apereo/cas/adaptors/yubikey/registry/YubiKeyAccountRegistryEndpoint.java#L41-L45 |
126,826 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java | DigestUtils.sha512 | public static String sha512(final String data) {
return digest(MessageDigestAlgorithms.SHA_512, data.getBytes(StandardCharsets.UTF_8));
} | java | public static String sha512(final String data) {
return digest(MessageDigestAlgorithms.SHA_512, data.getBytes(StandardCharsets.UTF_8));
} | [
"public",
"static",
"String",
"sha512",
"(",
"final",
"String",
"data",
")",
"{",
"return",
"digest",
"(",
"MessageDigestAlgorithms",
".",
"SHA_512",
",",
"data",
".",
"getBytes",
"(",
"StandardCharsets",
".",
"UTF_8",
")",
")",
";",
"}"
] | Computes hex encoded SHA512 digest.
@param data data to be hashed
@return sha-512 hash | [
"Computes",
"hex",
"encoded",
"SHA512",
"digest",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java#L30-L32 |
126,827 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java | DigestUtils.sha256 | public static String sha256(final String data) {
return digest(MessageDigestAlgorithms.SHA_256, data.getBytes(StandardCharsets.UTF_8));
} | java | public static String sha256(final String data) {
return digest(MessageDigestAlgorithms.SHA_256, data.getBytes(StandardCharsets.UTF_8));
} | [
"public",
"static",
"String",
"sha256",
"(",
"final",
"String",
"data",
")",
"{",
"return",
"digest",
"(",
"MessageDigestAlgorithms",
".",
"SHA_256",
",",
"data",
".",
"getBytes",
"(",
"StandardCharsets",
".",
"UTF_8",
")",
")",
";",
"}"
] | Computes hex encoded SHA256 digest.
@param data data to be hashed
@return sha-256 hash | [
"Computes",
"hex",
"encoded",
"SHA256",
"digest",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java#L40-L42 |
126,828 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java | DigestUtils.shaBase32 | public static String shaBase32(final String salt, final String data, final String separator, final boolean chunked) {
val result = rawDigest(MessageDigestAlgorithms.SHA_1, salt, separator == null ? data : data + separator);
return EncodingUtils.encodeBase32(result, chunked);
} | java | public static String shaBase32(final String salt, final String data, final String separator, final boolean chunked) {
val result = rawDigest(MessageDigestAlgorithms.SHA_1, salt, separator == null ? data : data + separator);
return EncodingUtils.encodeBase32(result, chunked);
} | [
"public",
"static",
"String",
"shaBase32",
"(",
"final",
"String",
"salt",
",",
"final",
"String",
"data",
",",
"final",
"String",
"separator",
",",
"final",
"boolean",
"chunked",
")",
"{",
"val",
"result",
"=",
"rawDigest",
"(",
"MessageDigestAlgorithms",
"."... | Sha base 32 string.
@param salt the salt
@param data the data
@param separator a string separator, if any
@param chunked the chunked
@return the string | [
"Sha",
"base",
"32",
"string",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java#L111-L114 |
126,829 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java | DigestUtils.rawDigest | public static byte[] rawDigest(final String alg, final byte[] data) {
try {
val digest = getMessageDigestInstance(alg);
return digest.digest(data);
} catch (final Exception cause) {
throw new SecurityException(cause);
}
} | java | public static byte[] rawDigest(final String alg, final byte[] data) {
try {
val digest = getMessageDigestInstance(alg);
return digest.digest(data);
} catch (final Exception cause) {
throw new SecurityException(cause);
}
} | [
"public",
"static",
"byte",
"[",
"]",
"rawDigest",
"(",
"final",
"String",
"alg",
",",
"final",
"byte",
"[",
"]",
"data",
")",
"{",
"try",
"{",
"val",
"digest",
"=",
"getMessageDigestInstance",
"(",
"alg",
")",
";",
"return",
"digest",
".",
"digest",
"... | Computes digest.
@param alg Digest algorithm to use
@param data data to be hashed
@return hash | [
"Computes",
"digest",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java#L145-L152 |
126,830 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.executeSearchOperation | public static Response<SearchResult> executeSearchOperation(final ConnectionFactory connectionFactory,
final String baseDn,
final SearchFilter filter) throws LdapException {
return exe... | java | public static Response<SearchResult> executeSearchOperation(final ConnectionFactory connectionFactory,
final String baseDn,
final SearchFilter filter) throws LdapException {
return exe... | [
"public",
"static",
"Response",
"<",
"SearchResult",
">",
"executeSearchOperation",
"(",
"final",
"ConnectionFactory",
"connectionFactory",
",",
"final",
"String",
"baseDn",
",",
"final",
"SearchFilter",
"filter",
")",
"throws",
"LdapException",
"{",
"return",
"execut... | Execute search operation response.
@param connectionFactory the connection factory
@param baseDn the base dn
@param filter the filter
@return the response
@throws LdapException the ldap exception | [
"Execute",
"search",
"operation",
"response",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L268-L272 |
126,831 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.containsResultEntry | public static boolean containsResultEntry(final Response<SearchResult> response) {
if (response != null) {
val result = response.getResult();
return result != null && result.getEntry() != null;
}
return false;
} | java | public static boolean containsResultEntry(final Response<SearchResult> response) {
if (response != null) {
val result = response.getResult();
return result != null && result.getEntry() != null;
}
return false;
} | [
"public",
"static",
"boolean",
"containsResultEntry",
"(",
"final",
"Response",
"<",
"SearchResult",
">",
"response",
")",
"{",
"if",
"(",
"response",
"!=",
"null",
")",
"{",
"val",
"result",
"=",
"response",
".",
"getResult",
"(",
")",
";",
"return",
"res... | Checks to see if response has a result.
@param response the response
@return true, if successful | [
"Checks",
"to",
"see",
"if",
"response",
"has",
"a",
"result",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L280-L286 |
126,832 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.createConnection | public static Connection createConnection(final ConnectionFactory connectionFactory) throws LdapException {
val c = connectionFactory.getConnection();
if (!c.isOpen()) {
c.open();
}
return c;
} | java | public static Connection createConnection(final ConnectionFactory connectionFactory) throws LdapException {
val c = connectionFactory.getConnection();
if (!c.isOpen()) {
c.open();
}
return c;
} | [
"public",
"static",
"Connection",
"createConnection",
"(",
"final",
"ConnectionFactory",
"connectionFactory",
")",
"throws",
"LdapException",
"{",
"val",
"c",
"=",
"connectionFactory",
".",
"getConnection",
"(",
")",
";",
"if",
"(",
"!",
"c",
".",
"isOpen",
"(",... | Gets connection from the factory.
Opens the connection if needed.
@param connectionFactory the connection factory
@return the connection
@throws LdapException the ldap exception | [
"Gets",
"connection",
"from",
"the",
"factory",
".",
"Opens",
"the",
"connection",
"if",
"needed",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L296-L302 |
126,833 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.executePasswordModifyOperation | public static boolean executePasswordModifyOperation(final String currentDn,
final ConnectionFactory connectionFactory,
final String oldPassword,
fin... | java | public static boolean executePasswordModifyOperation(final String currentDn,
final ConnectionFactory connectionFactory,
final String oldPassword,
fin... | [
"public",
"static",
"boolean",
"executePasswordModifyOperation",
"(",
"final",
"String",
"currentDn",
",",
"final",
"ConnectionFactory",
"connectionFactory",
",",
"final",
"String",
"oldPassword",
",",
"final",
"String",
"newPassword",
",",
"final",
"AbstractLdapPropertie... | Execute a password modify operation.
@param currentDn the current dn
@param connectionFactory the connection factory
@param oldPassword the old password
@param newPassword the new password
@param type the type
@return true /false | [
"Execute",
"a",
"password",
"modify",
"operation",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L314-L345 |
126,834 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.executeAddOperation | public static boolean executeAddOperation(final ConnectionFactory connectionFactory, final LdapEntry entry) {
try (val connection = createConnection(connectionFactory)) {
val operation = new AddOperation(connection);
operation.execute(new AddRequest(entry.getDn(), entry.getAttributes()))... | java | public static boolean executeAddOperation(final ConnectionFactory connectionFactory, final LdapEntry entry) {
try (val connection = createConnection(connectionFactory)) {
val operation = new AddOperation(connection);
operation.execute(new AddRequest(entry.getDn(), entry.getAttributes()))... | [
"public",
"static",
"boolean",
"executeAddOperation",
"(",
"final",
"ConnectionFactory",
"connectionFactory",
",",
"final",
"LdapEntry",
"entry",
")",
"{",
"try",
"(",
"val",
"connection",
"=",
"createConnection",
"(",
"connectionFactory",
")",
")",
"{",
"val",
"o... | Execute add operation boolean.
@param connectionFactory the connection factory
@param entry the entry
@return true/false | [
"Execute",
"add",
"operation",
"boolean",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L399-L408 |
126,835 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.executeDeleteOperation | public static boolean executeDeleteOperation(final ConnectionFactory connectionFactory, final LdapEntry entry) {
try (val connection = createConnection(connectionFactory)) {
val delete = new DeleteOperation(connection);
val request = new DeleteRequest(entry.getDn());
request.... | java | public static boolean executeDeleteOperation(final ConnectionFactory connectionFactory, final LdapEntry entry) {
try (val connection = createConnection(connectionFactory)) {
val delete = new DeleteOperation(connection);
val request = new DeleteRequest(entry.getDn());
request.... | [
"public",
"static",
"boolean",
"executeDeleteOperation",
"(",
"final",
"ConnectionFactory",
"connectionFactory",
",",
"final",
"LdapEntry",
"entry",
")",
"{",
"try",
"(",
"val",
"connection",
"=",
"createConnection",
"(",
"connectionFactory",
")",
")",
"{",
"val",
... | Execute delete operation boolean.
@param connectionFactory the connection factory
@param entry the entry
@return true/false | [
"Execute",
"delete",
"operation",
"boolean",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L417-L428 |
126,836 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.newLdaptiveSearchRequest | public static SearchRequest newLdaptiveSearchRequest(final String baseDn,
final SearchFilter filter) {
return newLdaptiveSearchRequest(baseDn, filter, ReturnAttributes.ALL_USER.value(), ReturnAttributes.ALL_USER.value());
} | java | public static SearchRequest newLdaptiveSearchRequest(final String baseDn,
final SearchFilter filter) {
return newLdaptiveSearchRequest(baseDn, filter, ReturnAttributes.ALL_USER.value(), ReturnAttributes.ALL_USER.value());
} | [
"public",
"static",
"SearchRequest",
"newLdaptiveSearchRequest",
"(",
"final",
"String",
"baseDn",
",",
"final",
"SearchFilter",
"filter",
")",
"{",
"return",
"newLdaptiveSearchRequest",
"(",
"baseDn",
",",
"filter",
",",
"ReturnAttributes",
".",
"ALL_USER",
".",
"v... | New ldaptive search request.
Returns all attributes.
@param baseDn the base dn
@param filter the filter
@return the search request | [
"New",
"ldaptive",
"search",
"request",
".",
"Returns",
"all",
"attributes",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L488-L491 |
126,837 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.newLdaptiveSearchExecutor | public static SearchExecutor newLdaptiveSearchExecutor(final String baseDn, final String filterQuery, final List<String> params) {
return newLdaptiveSearchExecutor(baseDn, filterQuery, params, ReturnAttributes.ALL.value());
} | java | public static SearchExecutor newLdaptiveSearchExecutor(final String baseDn, final String filterQuery, final List<String> params) {
return newLdaptiveSearchExecutor(baseDn, filterQuery, params, ReturnAttributes.ALL.value());
} | [
"public",
"static",
"SearchExecutor",
"newLdaptiveSearchExecutor",
"(",
"final",
"String",
"baseDn",
",",
"final",
"String",
"filterQuery",
",",
"final",
"List",
"<",
"String",
">",
"params",
")",
"{",
"return",
"newLdaptiveSearchExecutor",
"(",
"baseDn",
",",
"fi... | New search executor.
@param baseDn the base dn
@param filterQuery the filter query
@param params the params
@return the search executor | [
"New",
"search",
"executor",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L576-L578 |
126,838 | apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.newLdaptiveAuthenticator | public static Authenticator newLdaptiveAuthenticator(final AbstractLdapAuthenticationProperties l) {
switch (l.getType()) {
case AD:
LOGGER.debug("Creating active directory authenticator for [{}]", l.getLdapUrl());
return getActiveDirectoryAuthenticator(l);
... | java | public static Authenticator newLdaptiveAuthenticator(final AbstractLdapAuthenticationProperties l) {
switch (l.getType()) {
case AD:
LOGGER.debug("Creating active directory authenticator for [{}]", l.getLdapUrl());
return getActiveDirectoryAuthenticator(l);
... | [
"public",
"static",
"Authenticator",
"newLdaptiveAuthenticator",
"(",
"final",
"AbstractLdapAuthenticationProperties",
"l",
")",
"{",
"switch",
"(",
"l",
".",
"getType",
"(",
")",
")",
"{",
"case",
"AD",
":",
"LOGGER",
".",
"debug",
"(",
"\"Creating active directo... | New ldap authenticator.
@param l the ldap settings.
@return the authenticator | [
"New",
"ldap",
"authenticator",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L632-L647 |
126,839 | apereo/cas | core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/bypass/CredentialMultifactorAuthenticationProviderBypass.java | CredentialMultifactorAuthenticationProviderBypass.locateMatchingCredentialType | protected static boolean locateMatchingCredentialType(final Authentication authentication, final String credentialClassType) {
return StringUtils.isNotBlank(credentialClassType) && authentication.getCredentials()
.stream()
.anyMatch(e -> e.getCredentialClass().getName().matches(credentia... | java | protected static boolean locateMatchingCredentialType(final Authentication authentication, final String credentialClassType) {
return StringUtils.isNotBlank(credentialClassType) && authentication.getCredentials()
.stream()
.anyMatch(e -> e.getCredentialClass().getName().matches(credentia... | [
"protected",
"static",
"boolean",
"locateMatchingCredentialType",
"(",
"final",
"Authentication",
"authentication",
",",
"final",
"String",
"credentialClassType",
")",
"{",
"return",
"StringUtils",
".",
"isNotBlank",
"(",
"credentialClassType",
")",
"&&",
"authentication"... | Locate matching credential type boolean.
@param authentication the authentication
@param credentialClassType the credential class type
@return the boolean | [
"Locate",
"matching",
"credential",
"type",
"boolean",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/bypass/CredentialMultifactorAuthenticationProviderBypass.java#L53-L57 |
126,840 | apereo/cas | support/cas-server-support-git-service-registry/src/main/java/org/apereo/cas/git/GitRepositoryBuilder.java | GitRepositoryBuilder.credentialProvider | public GitRepositoryBuilder credentialProvider(final String username, final String password) {
if (StringUtils.hasText(username)) {
this.credentialsProviders.add(new UsernamePasswordCredentialsProvider(username, password));
}
return this;
} | java | public GitRepositoryBuilder credentialProvider(final String username, final String password) {
if (StringUtils.hasText(username)) {
this.credentialsProviders.add(new UsernamePasswordCredentialsProvider(username, password));
}
return this;
} | [
"public",
"GitRepositoryBuilder",
"credentialProvider",
"(",
"final",
"String",
"username",
",",
"final",
"String",
"password",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"username",
")",
")",
"{",
"this",
".",
"credentialsProviders",
".",
"add",
... | Credential provider for repositories that require access.
@param username the username
@param password the password
@return the git repository builder | [
"Credential",
"provider",
"for",
"repositories",
"that",
"require",
"access",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-git-service-registry/src/main/java/org/apereo/cas/git/GitRepositoryBuilder.java#L75-L80 |
126,841 | apereo/cas | support/cas-server-support-git-service-registry/src/main/java/org/apereo/cas/git/GitRepositoryBuilder.java | GitRepositoryBuilder.build | public GitRepository build() {
try {
val providers = this.credentialsProviders.toArray(CredentialsProvider[]::new);
if (this.repositoryDirectory.exists()) {
val git = Git.open(this.repositoryDirectory);
git.checkout()
.setName(this.acti... | java | public GitRepository build() {
try {
val providers = this.credentialsProviders.toArray(CredentialsProvider[]::new);
if (this.repositoryDirectory.exists()) {
val git = Git.open(this.repositoryDirectory);
git.checkout()
.setName(this.acti... | [
"public",
"GitRepository",
"build",
"(",
")",
"{",
"try",
"{",
"val",
"providers",
"=",
"this",
".",
"credentialsProviders",
".",
"toArray",
"(",
"CredentialsProvider",
"[",
"]",
"::",
"new",
")",
";",
"if",
"(",
"this",
".",
"repositoryDirectory",
".",
"e... | Build git repository.
@return the git repository | [
"Build",
"git",
"repository",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-git-service-registry/src/main/java/org/apereo/cas/git/GitRepositoryBuilder.java#L87-L117 |
126,842 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java | HttpUtils.execute | public static HttpResponse execute(final String url,
final String method,
final String basicAuthUsername,
final String basicAuthPassword,
final Map<String, Object> ... | java | public static HttpResponse execute(final String url,
final String method,
final String basicAuthUsername,
final String basicAuthPassword,
final Map<String, Object> ... | [
"public",
"static",
"HttpResponse",
"execute",
"(",
"final",
"String",
"url",
",",
"final",
"String",
"method",
",",
"final",
"String",
"basicAuthUsername",
",",
"final",
"String",
"basicAuthPassword",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"p... | Execute http request and produce a response.
@param url the url
@param method the method
@param basicAuthUsername the basic auth username
@param basicAuthPassword the basic auth password
@param parameters the parameters
@param headers the headers
@param entity the e... | [
"Execute",
"http",
"request",
"and",
"produce",
"a",
"response",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java#L134-L151 |
126,843 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java | HttpUtils.close | public static void close(final HttpResponse response) {
if (response instanceof CloseableHttpResponse) {
val closeableHttpResponse = (CloseableHttpResponse) response;
try {
closeableHttpResponse.close();
} catch (final IOException e) {
LOGGER.e... | java | public static void close(final HttpResponse response) {
if (response instanceof CloseableHttpResponse) {
val closeableHttpResponse = (CloseableHttpResponse) response;
try {
closeableHttpResponse.close();
} catch (final IOException e) {
LOGGER.e... | [
"public",
"static",
"void",
"close",
"(",
"final",
"HttpResponse",
"response",
")",
"{",
"if",
"(",
"response",
"instanceof",
"CloseableHttpResponse",
")",
"{",
"val",
"closeableHttpResponse",
"=",
"(",
"CloseableHttpResponse",
")",
"response",
";",
"try",
"{",
... | Close the response.
@param response the response to close | [
"Close",
"the",
"response",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java#L158-L167 |
126,844 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java | HttpUtils.prepareHttpRequest | private static void prepareHttpRequest(final HttpUriRequest request, final String basicAuthUsername,
final String basicAuthPassword, final Map<String, Object> parameters) {
if (StringUtils.isNotBlank(basicAuthUsername) && StringUtils.isNotBlank(basicAuthPassword)) {
... | java | private static void prepareHttpRequest(final HttpUriRequest request, final String basicAuthUsername,
final String basicAuthPassword, final Map<String, Object> parameters) {
if (StringUtils.isNotBlank(basicAuthUsername) && StringUtils.isNotBlank(basicAuthPassword)) {
... | [
"private",
"static",
"void",
"prepareHttpRequest",
"(",
"final",
"HttpUriRequest",
"request",
",",
"final",
"String",
"basicAuthUsername",
",",
"final",
"String",
"basicAuthPassword",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
")",
"{",
... | Prepare http request. Tries to set the authorization header
in cases where the URL endpoint does not actually produce the header
on its own.
@param request the request
@param basicAuthUsername the basic auth username
@param basicAuthPassword the basic auth password
@param parameters the parameters | [
"Prepare",
"http",
"request",
".",
"Tries",
"to",
"set",
"the",
"authorization",
"header",
"in",
"cases",
"where",
"the",
"URL",
"endpoint",
"does",
"not",
"actually",
"produce",
"the",
"header",
"on",
"its",
"own",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java#L407-L413 |
126,845 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java | HttpUtils.createBasicAuthHeaders | public static org.springframework.http.HttpHeaders createBasicAuthHeaders(final String basicAuthUser, final String basicAuthPassword) {
val acceptHeaders = new org.springframework.http.HttpHeaders();
acceptHeaders.setAccept(CollectionUtils.wrap(MediaType.APPLICATION_JSON));
if (StringUtils.isNot... | java | public static org.springframework.http.HttpHeaders createBasicAuthHeaders(final String basicAuthUser, final String basicAuthPassword) {
val acceptHeaders = new org.springframework.http.HttpHeaders();
acceptHeaders.setAccept(CollectionUtils.wrap(MediaType.APPLICATION_JSON));
if (StringUtils.isNot... | [
"public",
"static",
"org",
".",
"springframework",
".",
"http",
".",
"HttpHeaders",
"createBasicAuthHeaders",
"(",
"final",
"String",
"basicAuthUser",
",",
"final",
"String",
"basicAuthPassword",
")",
"{",
"val",
"acceptHeaders",
"=",
"new",
"org",
".",
"springfra... | Create headers org . springframework . http . http headers.
@param basicAuthUser the basic auth user
@param basicAuthPassword the basic auth password
@return the org . springframework . http . http headers | [
"Create",
"headers",
"org",
".",
"springframework",
".",
"http",
".",
"http",
"headers",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/HttpUtils.java#L428-L437 |
126,846 | apereo/cas | support/cas-server-support-consent-core/src/main/java/org/apereo/cas/consent/DefaultConsentDecisionBuilder.java | DefaultConsentDecisionBuilder.buildAndEncodeConsentAttributes | protected String buildAndEncodeConsentAttributes(final Map<String, List<Object>> attributes) {
try {
val json = MAPPER.writer(new MinimalPrettyPrinter()).writeValueAsString(attributes);
val base64 = EncodingUtils.encodeBase64(json);
return this.consentCipherExecutor.encode(ba... | java | protected String buildAndEncodeConsentAttributes(final Map<String, List<Object>> attributes) {
try {
val json = MAPPER.writer(new MinimalPrettyPrinter()).writeValueAsString(attributes);
val base64 = EncodingUtils.encodeBase64(json);
return this.consentCipherExecutor.encode(ba... | [
"protected",
"String",
"buildAndEncodeConsentAttributes",
"(",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"attributes",
")",
"{",
"try",
"{",
"val",
"json",
"=",
"MAPPER",
".",
"writer",
"(",
"new",
"MinimalPrettyPrinter",
"(",
")",... | Build consent attribute names string.
@param attributes the attributes
@return the string | [
"Build",
"consent",
"attribute",
"names",
"string",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-consent-core/src/main/java/org/apereo/cas/consent/DefaultConsentDecisionBuilder.java#L115-L123 |
126,847 | apereo/cas | support/cas-server-support-pac4j-api/src/main/java/org/apereo/cas/integration/pac4j/DistributedJ2ESessionStore.java | DistributedJ2ESessionStore.removeSessionTicket | private void removeSessionTicket(final String id) {
val ticketId = TransientSessionTicketFactory.normalizeTicketId(id);
this.ticketRegistry.deleteTicket(ticketId);
} | java | private void removeSessionTicket(final String id) {
val ticketId = TransientSessionTicketFactory.normalizeTicketId(id);
this.ticketRegistry.deleteTicket(ticketId);
} | [
"private",
"void",
"removeSessionTicket",
"(",
"final",
"String",
"id",
")",
"{",
"val",
"ticketId",
"=",
"TransientSessionTicketFactory",
".",
"normalizeTicketId",
"(",
"id",
")",
";",
"this",
".",
"ticketRegistry",
".",
"deleteTicket",
"(",
"ticketId",
")",
";... | Remove session ticket.
@param id the id | [
"Remove",
"session",
"ticket",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-api/src/main/java/org/apereo/cas/integration/pac4j/DistributedJ2ESessionStore.java#L90-L93 |
126,848 | apereo/cas | support/cas-server-support-rest-core/src/main/java/org/apereo/cas/support/rest/resources/TicketStatusResource.java | TicketStatusResource.getTicketStatus | @GetMapping(value = "/v1/tickets/{id:.+}")
public ResponseEntity<String> getTicketStatus(@PathVariable("id") final String id) {
try {
val ticket = this.centralAuthenticationService.getTicket(id);
return new ResponseEntity<>(ticket.getId(), HttpStatus.OK);
} catch (final Inval... | java | @GetMapping(value = "/v1/tickets/{id:.+}")
public ResponseEntity<String> getTicketStatus(@PathVariable("id") final String id) {
try {
val ticket = this.centralAuthenticationService.getTicket(id);
return new ResponseEntity<>(ticket.getId(), HttpStatus.OK);
} catch (final Inval... | [
"@",
"GetMapping",
"(",
"value",
"=",
"\"/v1/tickets/{id:.+}\"",
")",
"public",
"ResponseEntity",
"<",
"String",
">",
"getTicketStatus",
"(",
"@",
"PathVariable",
"(",
"\"id\"",
")",
"final",
"String",
"id",
")",
"{",
"try",
"{",
"val",
"ticket",
"=",
"this"... | Determine the status of a given ticket id, whether it's valid, exists, expired, etc.
@param id ticket id
@return {@link ResponseEntity} representing RESTful response | [
"Determine",
"the",
"status",
"of",
"a",
"given",
"ticket",
"id",
"whether",
"it",
"s",
"valid",
"exists",
"expired",
"etc",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-rest-core/src/main/java/org/apereo/cas/support/rest/resources/TicketStatusResource.java#L42-L53 |
126,849 | apereo/cas | core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/loader/BaseConfigurationPropertiesLoader.java | BaseConfigurationPropertiesLoader.decryptProperties | protected Map<String, Object> decryptProperties(final Map properties) {
return configurationCipherExecutor.decode(properties, ArrayUtils.EMPTY_OBJECT_ARRAY);
} | java | protected Map<String, Object> decryptProperties(final Map properties) {
return configurationCipherExecutor.decode(properties, ArrayUtils.EMPTY_OBJECT_ARRAY);
} | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"decryptProperties",
"(",
"final",
"Map",
"properties",
")",
"{",
"return",
"configurationCipherExecutor",
".",
"decode",
"(",
"properties",
",",
"ArrayUtils",
".",
"EMPTY_OBJECT_ARRAY",
")",
";",
"}"
] | Decrypt properties map.
@param properties the properties
@return the map | [
"Decrypt",
"properties",
"map",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/loader/BaseConfigurationPropertiesLoader.java#L45-L47 |
126,850 | apereo/cas | support/cas-server-support-jdbc-authentication/src/main/java/org/apereo/cas/adaptors/jdbc/QueryAndEncodeDatabaseAuthenticationHandler.java | QueryAndEncodeDatabaseAuthenticationHandler.digestEncodedPassword | protected String digestEncodedPassword(final String encodedPassword, final Map<String, Object> values) {
val hashService = new DefaultHashService();
if (StringUtils.isNotBlank(this.staticSalt)) {
hashService.setPrivateSalt(ByteSource.Util.bytes(this.staticSalt));
}
hashServic... | java | protected String digestEncodedPassword(final String encodedPassword, final Map<String, Object> values) {
val hashService = new DefaultHashService();
if (StringUtils.isNotBlank(this.staticSalt)) {
hashService.setPrivateSalt(ByteSource.Util.bytes(this.staticSalt));
}
hashServic... | [
"protected",
"String",
"digestEncodedPassword",
"(",
"final",
"String",
"encodedPassword",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"values",
")",
"{",
"val",
"hashService",
"=",
"new",
"DefaultHashService",
"(",
")",
";",
"if",
"(",
"StringUtil... | Digest encoded password.
@param encodedPassword the encoded password
@param values the values retrieved from database
@return the digested password | [
"Digest",
"encoded",
"password",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-jdbc-authentication/src/main/java/org/apereo/cas/adaptors/jdbc/QueryAndEncodeDatabaseAuthenticationHandler.java#L177-L201 |
126,851 | apereo/cas | core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegisteredServiceAccessStrategyUtils.java | RegisteredServiceAccessStrategyUtils.ensurePrincipalAccessIsAllowedForService | static void ensurePrincipalAccessIsAllowedForService(final Service service, final RegisteredService registeredService,
final TicketGrantingTicket ticketGrantingTicket,
final boolean retrievePrincipalAttribu... | java | static void ensurePrincipalAccessIsAllowedForService(final Service service, final RegisteredService registeredService,
final TicketGrantingTicket ticketGrantingTicket,
final boolean retrievePrincipalAttribu... | [
"static",
"void",
"ensurePrincipalAccessIsAllowedForService",
"(",
"final",
"Service",
"service",
",",
"final",
"RegisteredService",
"registeredService",
",",
"final",
"TicketGrantingTicket",
"ticketGrantingTicket",
",",
"final",
"boolean",
"retrievePrincipalAttributesFromRelease... | Ensure service access is allowed. Determines the final authentication object
by looking into the chained authentications of the ticket granting ticket.
@param service the service
@param registeredService the registered service
@param ticketGrantingTicket ... | [
"Ensure",
"service",
"access",
"is",
"allowed",
".",
"Determines",
"the",
"final",
"authentication",
"object",
"by",
"looking",
"into",
"the",
"chained",
"authentications",
"of",
"the",
"ticket",
"granting",
"ticket",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegisteredServiceAccessStrategyUtils.java#L184-L191 |
126,852 | apereo/cas | core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegisteredServiceAccessStrategyUtils.java | RegisteredServiceAccessStrategyUtils.getRegisteredServiceExpirationPolicyPredicate | public static Predicate<RegisteredService> getRegisteredServiceExpirationPolicyPredicate() {
return service -> {
try {
if (service == null) {
return false;
}
val policy = service.getExpirationPolicy();
if (policy == ... | java | public static Predicate<RegisteredService> getRegisteredServiceExpirationPolicyPredicate() {
return service -> {
try {
if (service == null) {
return false;
}
val policy = service.getExpirationPolicy();
if (policy == ... | [
"public",
"static",
"Predicate",
"<",
"RegisteredService",
">",
"getRegisteredServiceExpirationPolicyPredicate",
"(",
")",
"{",
"return",
"service",
"->",
"{",
"try",
"{",
"if",
"(",
"service",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"val",
"polic... | Returns a predicate that determined whether a service has expired.
@return true if the service is still valid. false if service has expired. | [
"Returns",
"a",
"predicate",
"that",
"determined",
"whether",
"a",
"service",
"has",
"expired",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegisteredServiceAccessStrategyUtils.java#L254-L273 |
126,853 | apereo/cas | support/cas-server-support-duo-core/src/main/java/org/apereo/cas/adaptors/duo/web/DuoSecurityUserAccountStatusEndpoint.java | DuoSecurityUserAccountStatusEndpoint.fetchAccountStatus | @ReadOperation(produces = MediaType.APPLICATION_JSON_VALUE)
public Map<?, ?> fetchAccountStatus(@Selector final String username, @Nullable final String providerId) {
val results = new LinkedHashMap<>();
val providers = applicationContext.getBeansOfType(DuoMultifactorAuthenticationProvider.class).val... | java | @ReadOperation(produces = MediaType.APPLICATION_JSON_VALUE)
public Map<?, ?> fetchAccountStatus(@Selector final String username, @Nullable final String providerId) {
val results = new LinkedHashMap<>();
val providers = applicationContext.getBeansOfType(DuoMultifactorAuthenticationProvider.class).val... | [
"@",
"ReadOperation",
"(",
"produces",
"=",
"MediaType",
".",
"APPLICATION_JSON_VALUE",
")",
"public",
"Map",
"<",
"?",
",",
"?",
">",
"fetchAccountStatus",
"(",
"@",
"Selector",
"final",
"String",
"username",
",",
"@",
"Nullable",
"final",
"String",
"provider... | Fetch account status map.
@param username the username
@param providerId the provider id
@return the map | [
"Fetch",
"account",
"status",
"map",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-duo-core/src/main/java/org/apereo/cas/adaptors/duo/web/DuoSecurityUserAccountStatusEndpoint.java#L44-L64 |
126,854 | apereo/cas | support/cas-server-support-generic/src/main/java/org/apereo/cas/adaptors/generic/FileAuthenticationHandler.java | FileAuthenticationHandler.getPasswordOnRecord | private String getPasswordOnRecord(final String username) throws IOException {
try (val stream = Files.lines(fileName.getFile().toPath())) {
return stream.map(line -> line.split(this.separator))
.filter(lineFields -> {
val userOnRecord = lineFields[0];
... | java | private String getPasswordOnRecord(final String username) throws IOException {
try (val stream = Files.lines(fileName.getFile().toPath())) {
return stream.map(line -> line.split(this.separator))
.filter(lineFields -> {
val userOnRecord = lineFields[0];
... | [
"private",
"String",
"getPasswordOnRecord",
"(",
"final",
"String",
"username",
")",
"throws",
"IOException",
"{",
"try",
"(",
"val",
"stream",
"=",
"Files",
".",
"lines",
"(",
"fileName",
".",
"getFile",
"(",
")",
".",
"toPath",
"(",
")",
")",
")",
"{",... | Gets the password on record.
@param username the username
@return the password on record
@throws IOException Signals that an I/O exception has occurred. | [
"Gets",
"the",
"password",
"on",
"record",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-generic/src/main/java/org/apereo/cas/adaptors/generic/FileAuthenticationHandler.java#L89-L100 |
126,855 | apereo/cas | support/cas-server-support-openid/src/main/java/org/apereo/cas/support/openid/web/mvc/YadisController.java | YadisController.yadis | @GetMapping(path = "/yadis.xml")
public void yadis(final HttpServletResponse response) throws Exception {
val template = this.resourceLoader.getResource("classpath:/yadis.template");
try (val writer = new StringWriter()) {
IOUtils.copy(template.getInputStream(), writer, StandardCharsets.... | java | @GetMapping(path = "/yadis.xml")
public void yadis(final HttpServletResponse response) throws Exception {
val template = this.resourceLoader.getResource("classpath:/yadis.template");
try (val writer = new StringWriter()) {
IOUtils.copy(template.getInputStream(), writer, StandardCharsets.... | [
"@",
"GetMapping",
"(",
"path",
"=",
"\"/yadis.xml\"",
")",
"public",
"void",
"yadis",
"(",
"final",
"HttpServletResponse",
"response",
")",
"throws",
"Exception",
"{",
"val",
"template",
"=",
"this",
".",
"resourceLoader",
".",
"getResource",
"(",
"\"classpath:... | Generates the Yadis XML snippet.
@param response the response
@throws Exception the exception | [
"Generates",
"the",
"Yadis",
"XML",
"snippet",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-openid/src/main/java/org/apereo/cas/support/openid/web/mvc/YadisController.java#L38-L49 |
126,856 | apereo/cas | core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/AbstractServiceRegistry.java | AbstractServiceRegistry.publishEvent | public void publishEvent(final ApplicationEvent event) {
if (this.eventPublisher != null) {
LOGGER.trace("Publishing event [{}]", event);
this.eventPublisher.publishEvent(event);
}
} | java | public void publishEvent(final ApplicationEvent event) {
if (this.eventPublisher != null) {
LOGGER.trace("Publishing event [{}]", event);
this.eventPublisher.publishEvent(event);
}
} | [
"public",
"void",
"publishEvent",
"(",
"final",
"ApplicationEvent",
"event",
")",
"{",
"if",
"(",
"this",
".",
"eventPublisher",
"!=",
"null",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"\"Publishing event [{}]\"",
",",
"event",
")",
";",
"this",
".",
"eventPubl... | Publish event.
@param event the event | [
"Publish",
"event",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/AbstractServiceRegistry.java#L26-L31 |
126,857 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/io/PathWatcherService.java | PathWatcherService.handleEvent | private void handleEvent(final WatchKey key) {
try {
key.pollEvents().forEach(event -> {
val eventName = event.kind().name();
val ev = (WatchEvent<Path>) event;
val filename = ev.context();
val parent = (Path) key.watchable();
... | java | private void handleEvent(final WatchKey key) {
try {
key.pollEvents().forEach(event -> {
val eventName = event.kind().name();
val ev = (WatchEvent<Path>) event;
val filename = ev.context();
val parent = (Path) key.watchable();
... | [
"private",
"void",
"handleEvent",
"(",
"final",
"WatchKey",
"key",
")",
"{",
"try",
"{",
"key",
".",
"pollEvents",
"(",
")",
".",
"forEach",
"(",
"event",
"->",
"{",
"val",
"eventName",
"=",
"event",
".",
"kind",
"(",
")",
".",
"name",
"(",
")",
";... | Handle event.
@param key the key | [
"Handle",
"event",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/io/PathWatcherService.java#L85-L109 |
126,858 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/io/PathWatcherService.java | PathWatcherService.start | @SneakyThrows
public void start(final String name) {
thread = new Thread(this);
thread.setName(name);
thread.start();
} | java | @SneakyThrows
public void start(final String name) {
thread = new Thread(this);
thread.setName(name);
thread.start();
} | [
"@",
"SneakyThrows",
"public",
"void",
"start",
"(",
"final",
"String",
"name",
")",
"{",
"thread",
"=",
"new",
"Thread",
"(",
"this",
")",
";",
"thread",
".",
"setName",
"(",
"name",
")",
";",
"thread",
".",
"start",
"(",
")",
";",
"}"
] | Start thread.
@param name the name | [
"Start",
"thread",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/io/PathWatcherService.java#L124-L129 |
126,859 | apereo/cas | core/cas-server-core-events/src/main/java/org/apereo/cas/support/events/listener/DefaultCasEventListener.java | DefaultCasEventListener.handleCasTicketGrantingTicketCreatedEvent | @EventListener
public void handleCasTicketGrantingTicketCreatedEvent(final CasTicketGrantingTicketCreatedEvent event) {
if (this.casEventRepository != null) {
val dto = prepareCasEvent(event);
dto.setCreationTime(event.getTicketGrantingTicket().getCreationTime().toString());
... | java | @EventListener
public void handleCasTicketGrantingTicketCreatedEvent(final CasTicketGrantingTicketCreatedEvent event) {
if (this.casEventRepository != null) {
val dto = prepareCasEvent(event);
dto.setCreationTime(event.getTicketGrantingTicket().getCreationTime().toString());
... | [
"@",
"EventListener",
"public",
"void",
"handleCasTicketGrantingTicketCreatedEvent",
"(",
"final",
"CasTicketGrantingTicketCreatedEvent",
"event",
")",
"{",
"if",
"(",
"this",
".",
"casEventRepository",
"!=",
"null",
")",
"{",
"val",
"dto",
"=",
"prepareCasEvent",
"("... | Handle TGT creation event.
@param event the event | [
"Handle",
"TGT",
"creation",
"event",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-events/src/main/java/org/apereo/cas/support/events/listener/DefaultCasEventListener.java#L73-L82 |
126,860 | apereo/cas | core/cas-server-core-events/src/main/java/org/apereo/cas/support/events/listener/DefaultCasEventListener.java | DefaultCasEventListener.handleCasRiskyAuthenticationDetectedEvent | @EventListener
public void handleCasRiskyAuthenticationDetectedEvent(final CasRiskyAuthenticationDetectedEvent event) {
if (this.casEventRepository != null) {
val dto = prepareCasEvent(event);
dto.putEventId(event.getService().getName());
dto.setPrincipalId(event.getAuthe... | java | @EventListener
public void handleCasRiskyAuthenticationDetectedEvent(final CasRiskyAuthenticationDetectedEvent event) {
if (this.casEventRepository != null) {
val dto = prepareCasEvent(event);
dto.putEventId(event.getService().getName());
dto.setPrincipalId(event.getAuthe... | [
"@",
"EventListener",
"public",
"void",
"handleCasRiskyAuthenticationDetectedEvent",
"(",
"final",
"CasRiskyAuthenticationDetectedEvent",
"event",
")",
"{",
"if",
"(",
"this",
".",
"casEventRepository",
"!=",
"null",
")",
"{",
"val",
"dto",
"=",
"prepareCasEvent",
"("... | Handle cas risky authentication detected event.
@param event the event | [
"Handle",
"cas",
"risky",
"authentication",
"detected",
"event",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-events/src/main/java/org/apereo/cas/support/events/listener/DefaultCasEventListener.java#L119-L127 |
126,861 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/InetAddressUtils.java | InetAddressUtils.getByName | public static InetAddress getByName(final String urlAddr) {
try {
val url = new URL(urlAddr);
return InetAddress.getByName(url.getHost());
} catch (final Exception e) {
LOGGER.trace("Host name could not be determined automatically.", e);
}
return null;... | java | public static InetAddress getByName(final String urlAddr) {
try {
val url = new URL(urlAddr);
return InetAddress.getByName(url.getHost());
} catch (final Exception e) {
LOGGER.trace("Host name could not be determined automatically.", e);
}
return null;... | [
"public",
"static",
"InetAddress",
"getByName",
"(",
"final",
"String",
"urlAddr",
")",
"{",
"try",
"{",
"val",
"url",
"=",
"new",
"URL",
"(",
"urlAddr",
")",
";",
"return",
"InetAddress",
".",
"getByName",
"(",
"url",
".",
"getHost",
"(",
")",
")",
";... | Gets by name.
@param urlAddr the host
@return the by name | [
"Gets",
"by",
"name",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/InetAddressUtils.java#L27-L35 |
126,862 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/InetAddressUtils.java | InetAddressUtils.getCasServerHostName | @SneakyThrows
public static String getCasServerHostName() {
val hostName = InetAddress.getLocalHost().getHostName();
val index = hostName.indexOf('.');
if (index > 0) {
return hostName.substring(0, index);
}
return hostName;
} | java | @SneakyThrows
public static String getCasServerHostName() {
val hostName = InetAddress.getLocalHost().getHostName();
val index = hostName.indexOf('.');
if (index > 0) {
return hostName.substring(0, index);
}
return hostName;
} | [
"@",
"SneakyThrows",
"public",
"static",
"String",
"getCasServerHostName",
"(",
")",
"{",
"val",
"hostName",
"=",
"InetAddress",
".",
"getLocalHost",
"(",
")",
".",
"getHostName",
"(",
")",
";",
"val",
"index",
"=",
"hostName",
".",
"indexOf",
"(",
"'",
"'... | Gets cas server host name.
@return the cas server host name | [
"Gets",
"cas",
"server",
"host",
"name",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/InetAddressUtils.java#L43-L51 |
126,863 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/InetAddressUtils.java | InetAddressUtils.getCasServerHostAddress | @SneakyThrows
public static String getCasServerHostAddress(final String name) {
val host = getByName(name);
if (host != null) {
return host.getHostAddress();
}
return null;
} | java | @SneakyThrows
public static String getCasServerHostAddress(final String name) {
val host = getByName(name);
if (host != null) {
return host.getHostAddress();
}
return null;
} | [
"@",
"SneakyThrows",
"public",
"static",
"String",
"getCasServerHostAddress",
"(",
"final",
"String",
"name",
")",
"{",
"val",
"host",
"=",
"getByName",
"(",
"name",
")",
";",
"if",
"(",
"host",
"!=",
"null",
")",
"{",
"return",
"host",
".",
"getHostAddres... | Gets cas server host address.
@param name the name
@return the cas server host address | [
"Gets",
"cas",
"server",
"host",
"address",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/InetAddressUtils.java#L59-L66 |
126,864 | apereo/cas | support/cas-server-support-trusted-mfa/src/main/java/org/apereo/cas/trusted/web/MultifactorTrustedDevicesReportEndpoint.java | MultifactorTrustedDevicesReportEndpoint.devices | @ReadOperation
public Set<? extends MultifactorAuthenticationTrustRecord> devices() {
val onOrAfter = expireRecordsByDate();
return this.mfaTrustEngine.get(onOrAfter);
} | java | @ReadOperation
public Set<? extends MultifactorAuthenticationTrustRecord> devices() {
val onOrAfter = expireRecordsByDate();
return this.mfaTrustEngine.get(onOrAfter);
} | [
"@",
"ReadOperation",
"public",
"Set",
"<",
"?",
"extends",
"MultifactorAuthenticationTrustRecord",
">",
"devices",
"(",
")",
"{",
"val",
"onOrAfter",
"=",
"expireRecordsByDate",
"(",
")",
";",
"return",
"this",
".",
"mfaTrustEngine",
".",
"get",
"(",
"onOrAfter... | Devices registered and trusted.
@return the set | [
"Devices",
"registered",
"and",
"trusted",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-trusted-mfa/src/main/java/org/apereo/cas/trusted/web/MultifactorTrustedDevicesReportEndpoint.java#L40-L44 |
126,865 | apereo/cas | support/cas-server-support-trusted-mfa/src/main/java/org/apereo/cas/trusted/web/MultifactorTrustedDevicesReportEndpoint.java | MultifactorTrustedDevicesReportEndpoint.devicesForUser | @ReadOperation
public Set<? extends MultifactorAuthenticationTrustRecord> devicesForUser(@Selector final String username) {
val onOrAfter = expireRecordsByDate();
return this.mfaTrustEngine.get(username, onOrAfter);
} | java | @ReadOperation
public Set<? extends MultifactorAuthenticationTrustRecord> devicesForUser(@Selector final String username) {
val onOrAfter = expireRecordsByDate();
return this.mfaTrustEngine.get(username, onOrAfter);
} | [
"@",
"ReadOperation",
"public",
"Set",
"<",
"?",
"extends",
"MultifactorAuthenticationTrustRecord",
">",
"devicesForUser",
"(",
"@",
"Selector",
"final",
"String",
"username",
")",
"{",
"val",
"onOrAfter",
"=",
"expireRecordsByDate",
"(",
")",
";",
"return",
"this... | Devices for user.
@param username the username
@return the set | [
"Devices",
"for",
"user",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-trusted-mfa/src/main/java/org/apereo/cas/trusted/web/MultifactorTrustedDevicesReportEndpoint.java#L60-L64 |
126,866 | apereo/cas | support/cas-server-support-trusted-mfa/src/main/java/org/apereo/cas/trusted/web/MultifactorTrustedDevicesReportEndpoint.java | MultifactorTrustedDevicesReportEndpoint.revoke | @DeleteOperation
public Integer revoke(@Selector final String key) {
this.mfaTrustEngine.expire(key);
return HttpStatus.OK.value();
} | java | @DeleteOperation
public Integer revoke(@Selector final String key) {
this.mfaTrustEngine.expire(key);
return HttpStatus.OK.value();
} | [
"@",
"DeleteOperation",
"public",
"Integer",
"revoke",
"(",
"@",
"Selector",
"final",
"String",
"key",
")",
"{",
"this",
".",
"mfaTrustEngine",
".",
"expire",
"(",
"key",
")",
";",
"return",
"HttpStatus",
".",
"OK",
".",
"value",
"(",
")",
";",
"}"
] | Revoke record and return status.
@param key the key
@return the integer | [
"Revoke",
"record",
"and",
"return",
"status",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-trusted-mfa/src/main/java/org/apereo/cas/trusted/web/MultifactorTrustedDevicesReportEndpoint.java#L72-L76 |
126,867 | apereo/cas | api/cas-server-core-api-events/src/main/java/org/apereo/cas/support/events/dao/CasEvent.java | CasEvent.put | public void put(final String key, final String value) {
if (StringUtils.isBlank(value)) {
this.properties.remove(key);
} else {
this.properties.put(key, value);
}
} | java | public void put(final String key, final String value) {
if (StringUtils.isBlank(value)) {
this.properties.remove(key);
} else {
this.properties.put(key, value);
}
} | [
"public",
"void",
"put",
"(",
"final",
"String",
"key",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"value",
")",
")",
"{",
"this",
".",
"properties",
".",
"remove",
"(",
"key",
")",
";",
"}",
"else",
"... | Put property.
@param key the key
@param value the value | [
"Put",
"property",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/api/cas-server-core-api-events/src/main/java/org/apereo/cas/support/events/dao/CasEvent.java#L151-L157 |
126,868 | apereo/cas | api/cas-server-core-api-events/src/main/java/org/apereo/cas/support/events/dao/CasEvent.java | CasEvent.putGeoLocation | public void putGeoLocation(final GeoLocationRequest location) {
putGeoAccuracy(location.getAccuracy());
putGeoLatitude(location.getLatitude());
putGeoLongitude(location.getLongitude());
putGeoTimestamp(location.getTimestamp());
} | java | public void putGeoLocation(final GeoLocationRequest location) {
putGeoAccuracy(location.getAccuracy());
putGeoLatitude(location.getLatitude());
putGeoLongitude(location.getLongitude());
putGeoTimestamp(location.getTimestamp());
} | [
"public",
"void",
"putGeoLocation",
"(",
"final",
"GeoLocationRequest",
"location",
")",
"{",
"putGeoAccuracy",
"(",
"location",
".",
"getAccuracy",
"(",
")",
")",
";",
"putGeoLatitude",
"(",
"location",
".",
"getLatitude",
"(",
")",
")",
";",
"putGeoLongitude",... | Put geo location.
@param location the location | [
"Put",
"geo",
"location",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/api/cas-server-core-api-events/src/main/java/org/apereo/cas/support/events/dao/CasEvent.java#L210-L215 |
126,869 | apereo/cas | api/cas-server-core-api-events/src/main/java/org/apereo/cas/support/events/dao/CasEvent.java | CasEvent.getGeoLocation | @JsonIgnore
public GeoLocationRequest getGeoLocation() {
val request = new GeoLocationRequest();
request.setAccuracy(get("geoAccuracy"));
request.setTimestamp(get("geoTimestamp"));
request.setLongitude(get("geoLongitude"));
request.setLatitude(get("geoLatitude"));
ret... | java | @JsonIgnore
public GeoLocationRequest getGeoLocation() {
val request = new GeoLocationRequest();
request.setAccuracy(get("geoAccuracy"));
request.setTimestamp(get("geoTimestamp"));
request.setLongitude(get("geoLongitude"));
request.setLatitude(get("geoLatitude"));
ret... | [
"@",
"JsonIgnore",
"public",
"GeoLocationRequest",
"getGeoLocation",
"(",
")",
"{",
"val",
"request",
"=",
"new",
"GeoLocationRequest",
"(",
")",
";",
"request",
".",
"setAccuracy",
"(",
"get",
"(",
"\"geoAccuracy\"",
")",
")",
";",
"request",
".",
"setTimesta... | Gets geo location.
@return the geo location | [
"Gets",
"geo",
"location",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/api/cas-server-core-api-events/src/main/java/org/apereo/cas/support/events/dao/CasEvent.java#L222-L230 |
126,870 | apereo/cas | core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/AbstractTicket.java | AbstractTicket.updateTicketGrantingTicketState | protected void updateTicketGrantingTicketState() {
val ticketGrantingTicket = getTicketGrantingTicket();
if (ticketGrantingTicket != null && !ticketGrantingTicket.isExpired()) {
val state = TicketState.class.cast(ticketGrantingTicket);
state.update();
}
} | java | protected void updateTicketGrantingTicketState() {
val ticketGrantingTicket = getTicketGrantingTicket();
if (ticketGrantingTicket != null && !ticketGrantingTicket.isExpired()) {
val state = TicketState.class.cast(ticketGrantingTicket);
state.update();
}
} | [
"protected",
"void",
"updateTicketGrantingTicketState",
"(",
")",
"{",
"val",
"ticketGrantingTicket",
"=",
"getTicketGrantingTicket",
"(",
")",
";",
"if",
"(",
"ticketGrantingTicket",
"!=",
"null",
"&&",
"!",
"ticketGrantingTicket",
".",
"isExpired",
"(",
")",
")",
... | Update ticket granting ticket state. | [
"Update",
"ticket",
"granting",
"ticket",
"state",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/AbstractTicket.java#L117-L123 |
126,871 | apereo/cas | core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/AbstractTicket.java | AbstractTicket.updateTicketState | protected void updateTicketState() {
LOGGER.trace("Before updating ticket [{}]\n\tPrevious time used: [{}]\n\tLast time used: [{}]\n\tUsage count: [{}]",
getId(), this.previousTimeUsed, this.lastTimeUsed, this.countOfUses);
this.previousTimeUsed = ZonedDateTime.from(this.lastTimeUsed);
... | java | protected void updateTicketState() {
LOGGER.trace("Before updating ticket [{}]\n\tPrevious time used: [{}]\n\tLast time used: [{}]\n\tUsage count: [{}]",
getId(), this.previousTimeUsed, this.lastTimeUsed, this.countOfUses);
this.previousTimeUsed = ZonedDateTime.from(this.lastTimeUsed);
... | [
"protected",
"void",
"updateTicketState",
"(",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"\"Before updating ticket [{}]\\n\\tPrevious time used: [{}]\\n\\tLast time used: [{}]\\n\\tUsage count: [{}]\"",
",",
"getId",
"(",
")",
",",
"this",
".",
"previousTimeUsed",
",",
"this",
... | Update ticket state. | [
"Update",
"ticket",
"state",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/AbstractTicket.java#L128-L138 |
126,872 | apereo/cas | support/cas-server-support-aup-webflow/src/main/java/org/apereo/cas/web/flow/AcceptableUsagePolicySubmitAction.java | AcceptableUsagePolicySubmitAction.submit | private Event submit(final RequestContext context, final Credential credential,
final MessageContext messageContext) {
if (repository.submit(context, credential)) {
return new EventFactorySupport().event(this,
CasWebflowConstants.TRANSITION_ID_AUP_ACCEPTED);
... | java | private Event submit(final RequestContext context, final Credential credential,
final MessageContext messageContext) {
if (repository.submit(context, credential)) {
return new EventFactorySupport().event(this,
CasWebflowConstants.TRANSITION_ID_AUP_ACCEPTED);
... | [
"private",
"Event",
"submit",
"(",
"final",
"RequestContext",
"context",
",",
"final",
"Credential",
"credential",
",",
"final",
"MessageContext",
"messageContext",
")",
"{",
"if",
"(",
"repository",
".",
"submit",
"(",
"context",
",",
"credential",
")",
")",
... | Record the fact that the policy is accepted.
@param context the context
@param credential the credential
@param messageContext the message context
@return success if policy acceptance is recorded successfully. | [
"Record",
"the",
"fact",
"that",
"the",
"policy",
"is",
"accepted",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-aup-webflow/src/main/java/org/apereo/cas/web/flow/AcceptableUsagePolicySubmitAction.java#L34-L41 |
126,873 | apereo/cas | support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/principal/X509SubjectAlternativeNameUPNPrincipalResolver.java | X509SubjectAlternativeNameUPNPrincipalResolver.getUPNStringFromSequence | private static String getUPNStringFromSequence(final ASN1Sequence seq) {
if (seq == null) {
return null;
}
val id = ASN1ObjectIdentifier.getInstance(seq.getObjectAt(0));
if (id != null && UPN_OBJECTID.equals(id.getId())) {
val obj = (ASN1TaggedObject) seq.getObjec... | java | private static String getUPNStringFromSequence(final ASN1Sequence seq) {
if (seq == null) {
return null;
}
val id = ASN1ObjectIdentifier.getInstance(seq.getObjectAt(0));
if (id != null && UPN_OBJECTID.equals(id.getId())) {
val obj = (ASN1TaggedObject) seq.getObjec... | [
"private",
"static",
"String",
"getUPNStringFromSequence",
"(",
"final",
"ASN1Sequence",
"seq",
")",
"{",
"if",
"(",
"seq",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"val",
"id",
"=",
"ASN1ObjectIdentifier",
".",
"getInstance",
"(",
"seq",
".",
"... | Get UPN String.
@param seq ASN1Sequence abstraction representing subject alternative name.
First element is the object identifier, second is the object itself.
@return UPN string or null | [
"Get",
"UPN",
"String",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/principal/X509SubjectAlternativeNameUPNPrincipalResolver.java#L63-L85 |
126,874 | apereo/cas | support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java | GoogleAuthenticatorAccountCouchDbRepository.findOneByUsername | @View(name = "by_username", map = "function(doc) { if(doc.secretKey) { emit(doc.username, doc) } }")
public CouchDbGoogleAuthenticatorAccount findOneByUsername(final String username) {
val view = createQuery("by_username").key(username).limit(1);
try {
return db.queryView(view, CouchDbGo... | java | @View(name = "by_username", map = "function(doc) { if(doc.secretKey) { emit(doc.username, doc) } }")
public CouchDbGoogleAuthenticatorAccount findOneByUsername(final String username) {
val view = createQuery("by_username").key(username).limit(1);
try {
return db.queryView(view, CouchDbGo... | [
"@",
"View",
"(",
"name",
"=",
"\"by_username\"",
",",
"map",
"=",
"\"function(doc) { if(doc.secretKey) { emit(doc.username, doc) } }\"",
")",
"public",
"CouchDbGoogleAuthenticatorAccount",
"findOneByUsername",
"(",
"final",
"String",
"username",
")",
"{",
"val",
"view",
... | Find first account for user.
@param username username for lookup
@return first one time token account for user | [
"Find",
"first",
"account",
"for",
"user",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java#L30-L38 |
126,875 | apereo/cas | support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java | GoogleAuthenticatorAccountCouchDbRepository.findByUsername | public List<CouchDbGoogleAuthenticatorAccount> findByUsername(final String username) {
try {
return queryView("by_username", username);
} catch (final DocumentNotFoundException ignored) {
return null;
}
} | java | public List<CouchDbGoogleAuthenticatorAccount> findByUsername(final String username) {
try {
return queryView("by_username", username);
} catch (final DocumentNotFoundException ignored) {
return null;
}
} | [
"public",
"List",
"<",
"CouchDbGoogleAuthenticatorAccount",
">",
"findByUsername",
"(",
"final",
"String",
"username",
")",
"{",
"try",
"{",
"return",
"queryView",
"(",
"\"by_username\"",
",",
"username",
")",
";",
"}",
"catch",
"(",
"final",
"DocumentNotFoundExce... | Final all accounts for user.
@param username username for account lookup
@return one time token accounts for user | [
"Final",
"all",
"accounts",
"for",
"user",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java#L45-L51 |
126,876 | apereo/cas | support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java | GoogleAuthenticatorAccountCouchDbRepository.deleteTokenAccount | @UpdateHandler(name = "delete_token_account", file = "CouchDbOneTimeTokenAccount_delete.js")
public void deleteTokenAccount(final CouchDbGoogleAuthenticatorAccount token) {
db.callUpdateHandler(stdDesignDocumentId, "delete_token_account", token.getCid(), null);
} | java | @UpdateHandler(name = "delete_token_account", file = "CouchDbOneTimeTokenAccount_delete.js")
public void deleteTokenAccount(final CouchDbGoogleAuthenticatorAccount token) {
db.callUpdateHandler(stdDesignDocumentId, "delete_token_account", token.getCid(), null);
} | [
"@",
"UpdateHandler",
"(",
"name",
"=",
"\"delete_token_account\"",
",",
"file",
"=",
"\"CouchDbOneTimeTokenAccount_delete.js\"",
")",
"public",
"void",
"deleteTokenAccount",
"(",
"final",
"CouchDbGoogleAuthenticatorAccount",
"token",
")",
"{",
"db",
".",
"callUpdateHandl... | Delete token without revision checks.
@param token token to delete | [
"Delete",
"token",
"without",
"revision",
"checks",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java#L57-L60 |
126,877 | apereo/cas | support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java | GoogleAuthenticatorAccountCouchDbRepository.count | @View(name = "count", map = "function(doc) { if(doc.secretKey) { emit(doc._id, doc) } }", reduce = "_count")
public long count() {
return db.queryView(createQuery("count")).getRows().get(0).getValueAsInt();
} | java | @View(name = "count", map = "function(doc) { if(doc.secretKey) { emit(doc._id, doc) } }", reduce = "_count")
public long count() {
return db.queryView(createQuery("count")).getRows().get(0).getValueAsInt();
} | [
"@",
"View",
"(",
"name",
"=",
"\"count\"",
",",
"map",
"=",
"\"function(doc) { if(doc.secretKey) { emit(doc._id, doc) } }\"",
",",
"reduce",
"=",
"\"_count\"",
")",
"public",
"long",
"count",
"(",
")",
"{",
"return",
"db",
".",
"queryView",
"(",
"createQuery",
... | Total token accounts in database.
@return count of accounts | [
"Total",
"token",
"accounts",
"in",
"database",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/credential/GoogleAuthenticatorAccountCouchDbRepository.java#L66-L69 |
126,878 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java | CollectionUtils.firstElement | public static Optional<Object> firstElement(final Object obj) {
val object = CollectionUtils.toCollection(obj);
if (object.isEmpty()) {
return Optional.empty();
}
return Optional.of(object.iterator().next());
} | java | public static Optional<Object> firstElement(final Object obj) {
val object = CollectionUtils.toCollection(obj);
if (object.isEmpty()) {
return Optional.empty();
}
return Optional.of(object.iterator().next());
} | [
"public",
"static",
"Optional",
"<",
"Object",
">",
"firstElement",
"(",
"final",
"Object",
"obj",
")",
"{",
"val",
"object",
"=",
"CollectionUtils",
".",
"toCollection",
"(",
"obj",
")",
";",
"if",
"(",
"object",
".",
"isEmpty",
"(",
")",
")",
"{",
"r... | Converts the provided object into a collection
and return the first element, or empty.
@param obj the obj
@return the optional | [
"Converts",
"the",
"provided",
"object",
"into",
"a",
"collection",
"and",
"return",
"the",
"first",
"element",
"or",
"empty",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java#L46-L52 |
126,879 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java | CollectionUtils.toCollection | @SneakyThrows
public static <T extends Collection> T toCollection(final Object obj, final Class<T> clazz) {
val results = toCollection(obj);
if (clazz.isInterface()) {
throw new IllegalArgumentException("Cannot accept an interface " + clazz.getSimpleName() + " to create a new object inst... | java | @SneakyThrows
public static <T extends Collection> T toCollection(final Object obj, final Class<T> clazz) {
val results = toCollection(obj);
if (clazz.isInterface()) {
throw new IllegalArgumentException("Cannot accept an interface " + clazz.getSimpleName() + " to create a new object inst... | [
"@",
"SneakyThrows",
"public",
"static",
"<",
"T",
"extends",
"Collection",
">",
"T",
"toCollection",
"(",
"final",
"Object",
"obj",
",",
"final",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"val",
"results",
"=",
"toCollection",
"(",
"obj",
")",
";",
"... | To collection t.
@param <T> the type parameter
@param obj the obj
@param clazz the clazz
@return the t | [
"To",
"collection",
"t",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java#L62-L71 |
126,880 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java | CollectionUtils.wrap | public static <K, V> Map<K, V> wrap(final Map<K, V> source) {
if (source != null && !source.isEmpty()) {
return new HashMap<>(source);
}
return new HashMap<>(0);
} | java | public static <K, V> Map<K, V> wrap(final Map<K, V> source) {
if (source != null && !source.isEmpty()) {
return new HashMap<>(source);
}
return new HashMap<>(0);
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"Map",
"<",
"K",
",",
"V",
">",
"wrap",
"(",
"final",
"Map",
"<",
"K",
",",
"V",
">",
"source",
")",
"{",
"if",
"(",
"source",
"!=",
"null",
"&&",
"!",
"source",
".",
"isEmpty",
"(",
")",
")",
"{... | Wraps a possibly null map in an immutable wrapper.
@param <K> the key type
@param <V> the value type
@param source map to wrap.
@return the map | [
"Wraps",
"a",
"possibly",
"null",
"map",
"in",
"an",
"immutable",
"wrapper",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java#L140-L145 |
126,881 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java | CollectionUtils.wrap | public static <T> Set<T> wrap(final Set<T> source) {
val list = new LinkedHashSet<T>();
if (source != null && !source.isEmpty()) {
list.addAll(source);
}
return list;
} | java | public static <T> Set<T> wrap(final Set<T> source) {
val list = new LinkedHashSet<T>();
if (source != null && !source.isEmpty()) {
list.addAll(source);
}
return list;
} | [
"public",
"static",
"<",
"T",
">",
"Set",
"<",
"T",
">",
"wrap",
"(",
"final",
"Set",
"<",
"T",
">",
"source",
")",
"{",
"val",
"list",
"=",
"new",
"LinkedHashSet",
"<",
"T",
">",
"(",
")",
";",
"if",
"(",
"source",
"!=",
"null",
"&&",
"!",
"... | Wrap varargs.
@param <T> the type parameter
@param source the source
@return the set | [
"Wrap",
"varargs",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java#L368-L374 |
126,882 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java | CollectionUtils.wrapSet | public static <T> Set<T> wrapSet(final T... source) {
val list = new LinkedHashSet<T>();
addToCollection(list, source);
return list;
} | java | public static <T> Set<T> wrapSet(final T... source) {
val list = new LinkedHashSet<T>();
addToCollection(list, source);
return list;
} | [
"public",
"static",
"<",
"T",
">",
"Set",
"<",
"T",
">",
"wrapSet",
"(",
"final",
"T",
"...",
"source",
")",
"{",
"val",
"list",
"=",
"new",
"LinkedHashSet",
"<",
"T",
">",
"(",
")",
";",
"addToCollection",
"(",
"list",
",",
"source",
")",
";",
"... | Wrap set.
@param <T> the type parameter
@param source the source
@return the set | [
"Wrap",
"set",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java#L398-L402 |
126,883 | apereo/cas | core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java | CollectionUtils.convertDirectedListToMap | public static Map<String, String> convertDirectedListToMap(final List<String> inputList) {
val mappings = new TreeMap<String, String>();
inputList
.stream()
.map(s -> {
val bits = Splitter.on("->").splitToList(s);
return Pair.of(bits.get(0), bits.g... | java | public static Map<String, String> convertDirectedListToMap(final List<String> inputList) {
val mappings = new TreeMap<String, String>();
inputList
.stream()
.map(s -> {
val bits = Splitter.on("->").splitToList(s);
return Pair.of(bits.get(0), bits.g... | [
"public",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"convertDirectedListToMap",
"(",
"final",
"List",
"<",
"String",
">",
"inputList",
")",
"{",
"val",
"mappings",
"=",
"new",
"TreeMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"inputL... | Convert directed list to map.
@param inputList the input list
@return the map | [
"Convert",
"directed",
"list",
"to",
"map",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java#L482-L492 |
126,884 | apereo/cas | core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java | PrincipalAttributeMultifactorAuthenticationTrigger.resolveMultifactorAuthenticationProvider | protected Set<Event> resolveMultifactorAuthenticationProvider(final Optional<RequestContext> context,
final RegisteredService service,
final Principal principal) {
val globalPrinci... | java | protected Set<Event> resolveMultifactorAuthenticationProvider(final Optional<RequestContext> context,
final RegisteredService service,
final Principal principal) {
val globalPrinci... | [
"protected",
"Set",
"<",
"Event",
">",
"resolveMultifactorAuthenticationProvider",
"(",
"final",
"Optional",
"<",
"RequestContext",
">",
"context",
",",
"final",
"RegisteredService",
"service",
",",
"final",
"Principal",
"principal",
")",
"{",
"val",
"globalPrincipalA... | Resolve multifactor authentication provider set.
@param context the context
@param service the service
@param principal the principal
@return the set | [
"Resolve",
"multifactor",
"authentication",
"provider",
"set",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java#L85-L96 |
126,885 | apereo/cas | core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java | PrincipalAttributeMultifactorAuthenticationTrigger.resolveMultifactorProviderViaPredicate | protected Set<Event> resolveMultifactorProviderViaPredicate(final Optional<RequestContext> context,
final RegisteredService service,
final Principal principal,
... | java | protected Set<Event> resolveMultifactorProviderViaPredicate(final Optional<RequestContext> context,
final RegisteredService service,
final Principal principal,
... | [
"protected",
"Set",
"<",
"Event",
">",
"resolveMultifactorProviderViaPredicate",
"(",
"final",
"Optional",
"<",
"RequestContext",
">",
"context",
",",
"final",
"RegisteredService",
"service",
",",
"final",
"Principal",
"principal",
",",
"final",
"Collection",
"<",
"... | Resolve multifactor provider by regex predicate set.
@param context the context
@param service the service
@param principal the principal
@param providers the providers
@return the set | [
"Resolve",
"multifactor",
"provider",
"by",
"regex",
"predicate",
"set",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java#L107-L114 |
126,886 | apereo/cas | core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java | PrincipalAttributeMultifactorAuthenticationTrigger.resolveSingleMultifactorProvider | protected Set<Event> resolveSingleMultifactorProvider(final Optional<RequestContext> context, final RegisteredService service,
final Principal principal,
final Collection<MultifactorAuthenticationProvider... | java | protected Set<Event> resolveSingleMultifactorProvider(final Optional<RequestContext> context, final RegisteredService service,
final Principal principal,
final Collection<MultifactorAuthenticationProvider... | [
"protected",
"Set",
"<",
"Event",
">",
"resolveSingleMultifactorProvider",
"(",
"final",
"Optional",
"<",
"RequestContext",
">",
"context",
",",
"final",
"RegisteredService",
"service",
",",
"final",
"Principal",
"principal",
",",
"final",
"Collection",
"<",
"Multif... | Resolve single multifactor provider set.
@param context the context
@param service the service
@param principal the principal
@param providers the providers
@return the set | [
"Resolve",
"single",
"multifactor",
"provider",
"set",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java#L125-L134 |
126,887 | apereo/cas | core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/support/DefaultCasProtocolAttributeEncoder.java | DefaultCasProtocolAttributeEncoder.encodeAndEncryptCredentialPassword | protected void encodeAndEncryptCredentialPassword(final Map<String, Object> attributes,
final Map<String, String> cachedAttributesToEncode,
final RegisteredServiceCipherExecutor cipher,
... | java | protected void encodeAndEncryptCredentialPassword(final Map<String, Object> attributes,
final Map<String, String> cachedAttributesToEncode,
final RegisteredServiceCipherExecutor cipher,
... | [
"protected",
"void",
"encodeAndEncryptCredentialPassword",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"attributes",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"cachedAttributesToEncode",
",",
"final",
"RegisteredServiceCipherExecutor",
"ciphe... | Encode and encrypt credential password using the public key
supplied by the service. The result is base64 encoded
and put into the attributes collection again, overwriting
the previous value.
@param attributes the attributes
@param cachedAttributesToEncode the cached attributes to encode
@param cipher ... | [
"Encode",
"and",
"encrypt",
"credential",
"password",
"using",
"the",
"public",
"key",
"supplied",
"by",
"the",
"service",
".",
"The",
"result",
"is",
"base64",
"encoded",
"and",
"put",
"into",
"the",
"attributes",
"collection",
"again",
"overwriting",
"the",
... | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/support/DefaultCasProtocolAttributeEncoder.java#L121-L138 |
126,888 | apereo/cas | core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/support/DefaultCasProtocolAttributeEncoder.java | DefaultCasProtocolAttributeEncoder.encodeAndEncryptProxyGrantingTicket | protected void encodeAndEncryptProxyGrantingTicket(final Map<String, Object> attributes,
final Map<String, String> cachedAttributesToEncode,
final RegisteredServiceCipherExecutor cipher,
... | java | protected void encodeAndEncryptProxyGrantingTicket(final Map<String, Object> attributes,
final Map<String, String> cachedAttributesToEncode,
final RegisteredServiceCipherExecutor cipher,
... | [
"protected",
"void",
"encodeAndEncryptProxyGrantingTicket",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"attributes",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"cachedAttributesToEncode",
",",
"final",
"RegisteredServiceCipherExecutor",
"ciph... | Encode and encrypt pgt.
@param attributes the attributes
@param cachedAttributesToEncode the cached attributes to encode
@param cipher the cipher
@param registeredService the registered service | [
"Encode",
"and",
"encrypt",
"pgt",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/support/DefaultCasProtocolAttributeEncoder.java#L148-L156 |
126,889 | apereo/cas | core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/support/DefaultCasProtocolAttributeEncoder.java | DefaultCasProtocolAttributeEncoder.encryptAndEncodeAndPutIntoAttributesMap | protected void encryptAndEncodeAndPutIntoAttributesMap(final Map<String, Object> attributes,
final Map<String, String> cachedAttributesToEncode,
final String cachedAttributeName,
... | java | protected void encryptAndEncodeAndPutIntoAttributesMap(final Map<String, Object> attributes,
final Map<String, String> cachedAttributesToEncode,
final String cachedAttributeName,
... | [
"protected",
"void",
"encryptAndEncodeAndPutIntoAttributesMap",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"attributes",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"cachedAttributesToEncode",
",",
"final",
"String",
"cachedAttributeName",
"... | Encrypt, encode and put the attribute into attributes map.
@param attributes the attributes
@param cachedAttributesToEncode the cached attributes to encode
@param cachedAttributeName the cached attribute name
@param cipher the cipher
@param registeredService the registered s... | [
"Encrypt",
"encode",
"and",
"put",
"the",
"attribute",
"into",
"attributes",
"map",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/support/DefaultCasProtocolAttributeEncoder.java#L167-L185 |
126,890 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/ext/AccessTokenAuthorizationCodeGrantRequestExtractor.java | AccessTokenAuthorizationCodeGrantRequestExtractor.extractInternal | protected AccessTokenRequestDataHolder extractInternal(final HttpServletRequest request, final HttpServletResponse response,
final AccessTokenRequestDataHolder.AccessTokenRequestDataHolderBuilder builder) {
return builder.build();
} | java | protected AccessTokenRequestDataHolder extractInternal(final HttpServletRequest request, final HttpServletResponse response,
final AccessTokenRequestDataHolder.AccessTokenRequestDataHolderBuilder builder) {
return builder.build();
} | [
"protected",
"AccessTokenRequestDataHolder",
"extractInternal",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HttpServletResponse",
"response",
",",
"final",
"AccessTokenRequestDataHolder",
".",
"AccessTokenRequestDataHolderBuilder",
"builder",
")",
"{",
"return... | Extract internal access token request.
@param request the request
@param response the response
@param builder the builder
@return the access token request data holder | [
"Extract",
"internal",
"access",
"token",
"request",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/ext/AccessTokenAuthorizationCodeGrantRequestExtractor.java#L74-L77 |
126,891 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/ext/AccessTokenAuthorizationCodeGrantRequestExtractor.java | AccessTokenAuthorizationCodeGrantRequestExtractor.getOAuthTokenFromRequest | protected OAuthToken getOAuthTokenFromRequest(final HttpServletRequest request) {
val token = getOAuthConfigurationContext().getTicketRegistry().getTicket(getOAuthParameter(request), OAuthToken.class);
if (token == null || token.isExpired()) {
LOGGER.error("OAuth token indicated by parameter... | java | protected OAuthToken getOAuthTokenFromRequest(final HttpServletRequest request) {
val token = getOAuthConfigurationContext().getTicketRegistry().getTicket(getOAuthParameter(request), OAuthToken.class);
if (token == null || token.isExpired()) {
LOGGER.error("OAuth token indicated by parameter... | [
"protected",
"OAuthToken",
"getOAuthTokenFromRequest",
"(",
"final",
"HttpServletRequest",
"request",
")",
"{",
"val",
"token",
"=",
"getOAuthConfigurationContext",
"(",
")",
".",
"getTicketRegistry",
"(",
")",
".",
"getTicket",
"(",
"getOAuthParameter",
"(",
"request... | Return the OAuth token.
@param request the request
@return the OAuth token | [
"Return",
"the",
"OAuth",
"token",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/ext/AccessTokenAuthorizationCodeGrantRequestExtractor.java#L118-L128 |
126,892 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/ext/AccessTokenAuthorizationCodeGrantRequestExtractor.java | AccessTokenAuthorizationCodeGrantRequestExtractor.getOAuthRegisteredServiceBy | protected OAuthRegisteredService getOAuthRegisteredServiceBy(final HttpServletRequest request) {
val redirectUri = getRegisteredServiceIdentifierFromRequest(request);
val registeredService = OAuth20Utils.getRegisteredOAuthServiceByRedirectUri(getOAuthConfigurationContext().getServicesManager(), redirect... | java | protected OAuthRegisteredService getOAuthRegisteredServiceBy(final HttpServletRequest request) {
val redirectUri = getRegisteredServiceIdentifierFromRequest(request);
val registeredService = OAuth20Utils.getRegisteredOAuthServiceByRedirectUri(getOAuthConfigurationContext().getServicesManager(), redirect... | [
"protected",
"OAuthRegisteredService",
"getOAuthRegisteredServiceBy",
"(",
"final",
"HttpServletRequest",
"request",
")",
"{",
"val",
"redirectUri",
"=",
"getRegisteredServiceIdentifierFromRequest",
"(",
"request",
")",
";",
"val",
"registeredService",
"=",
"OAuth20Utils",
... | Gets oauth registered service from the request.
Implementation attempts to locate the redirect uri from request and
check with service registry to find a matching oauth service.
@param request the request
@return the registered service | [
"Gets",
"oauth",
"registered",
"service",
"from",
"the",
"request",
".",
"Implementation",
"attempts",
"to",
"locate",
"the",
"redirect",
"uri",
"from",
"request",
"and",
"check",
"with",
"service",
"registry",
"to",
"find",
"a",
"matching",
"oauth",
"service",
... | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/ext/AccessTokenAuthorizationCodeGrantRequestExtractor.java#L160-L165 |
126,893 | apereo/cas | api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataClassSourceLocator.java | ConfigurationMetadataClassSourceLocator.buildTypeSourcePath | public static String buildTypeSourcePath(final String sourcePath, final String type) {
val newName = type.replace(".", File.separator);
return sourcePath + "/src/main/java/" + newName + ".java";
} | java | public static String buildTypeSourcePath(final String sourcePath, final String type) {
val newName = type.replace(".", File.separator);
return sourcePath + "/src/main/java/" + newName + ".java";
} | [
"public",
"static",
"String",
"buildTypeSourcePath",
"(",
"final",
"String",
"sourcePath",
",",
"final",
"String",
"type",
")",
"{",
"val",
"newName",
"=",
"type",
".",
"replace",
"(",
"\".\"",
",",
"File",
".",
"separator",
")",
";",
"return",
"sourcePath",... | Build type source path string.
@param sourcePath the source path
@param type the type
@return the string | [
"Build",
"type",
"source",
"path",
"string",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataClassSourceLocator.java#L49-L52 |
126,894 | apereo/cas | api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataClassSourceLocator.java | ConfigurationMetadataClassSourceLocator.locatePropertiesClassForType | public Class locatePropertiesClassForType(final ClassOrInterfaceType type) {
if (cachedPropertiesClasses.containsKey(type.getNameAsString())) {
return cachedPropertiesClasses.get(type.getNameAsString());
}
val packageName = ConfigurationMetadataGenerator.class.getPackage().getName()... | java | public Class locatePropertiesClassForType(final ClassOrInterfaceType type) {
if (cachedPropertiesClasses.containsKey(type.getNameAsString())) {
return cachedPropertiesClasses.get(type.getNameAsString());
}
val packageName = ConfigurationMetadataGenerator.class.getPackage().getName()... | [
"public",
"Class",
"locatePropertiesClassForType",
"(",
"final",
"ClassOrInterfaceType",
"type",
")",
"{",
"if",
"(",
"cachedPropertiesClasses",
".",
"containsKey",
"(",
"type",
".",
"getNameAsString",
"(",
")",
")",
")",
"{",
"return",
"cachedPropertiesClasses",
".... | Locate properties class for type class.
@param type the type
@return the class | [
"Locate",
"properties",
"class",
"for",
"type",
"class",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataClassSourceLocator.java#L60-L82 |
126,895 | apereo/cas | core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/loader/ConfigurationPropertiesLoaderFactory.java | ConfigurationPropertiesLoaderFactory.getLoader | public BaseConfigurationPropertiesLoader getLoader(final Resource resource,
final String name) {
val filename = StringUtils.defaultString(resource.getFilename()).toLowerCase();
if (filename.endsWith(".properties")) {
return new SimpleCo... | java | public BaseConfigurationPropertiesLoader getLoader(final Resource resource,
final String name) {
val filename = StringUtils.defaultString(resource.getFilename()).toLowerCase();
if (filename.endsWith(".properties")) {
return new SimpleCo... | [
"public",
"BaseConfigurationPropertiesLoader",
"getLoader",
"(",
"final",
"Resource",
"resource",
",",
"final",
"String",
"name",
")",
"{",
"val",
"filename",
"=",
"StringUtils",
".",
"defaultString",
"(",
"resource",
".",
"getFilename",
"(",
")",
")",
".",
"toL... | Gets loader.
@param resource the resource
@param name the name
@return the loader | [
"Gets",
"loader",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/loader/ConfigurationPropertiesLoaderFactory.java#L37-L52 |
126,896 | apereo/cas | core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/loader/ConfigurationPropertiesLoaderFactory.java | ConfigurationPropertiesLoaderFactory.getApplicationProfiles | public static List<String> getApplicationProfiles(final Environment environment) {
return Arrays.stream(environment.getActiveProfiles()).collect(Collectors.toList());
} | java | public static List<String> getApplicationProfiles(final Environment environment) {
return Arrays.stream(environment.getActiveProfiles()).collect(Collectors.toList());
} | [
"public",
"static",
"List",
"<",
"String",
">",
"getApplicationProfiles",
"(",
"final",
"Environment",
"environment",
")",
"{",
"return",
"Arrays",
".",
"stream",
"(",
"environment",
".",
"getActiveProfiles",
"(",
")",
")",
".",
"collect",
"(",
"Collectors",
"... | Gets application profiles.
@param environment the environment
@return the application profiles | [
"Gets",
"application",
"profiles",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/loader/ConfigurationPropertiesLoaderFactory.java#L60-L62 |
126,897 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/mgmt/OAuth20TokenManagementEndpoint.java | OAuth20TokenManagementEndpoint.getTokens | @ReadOperation
public Collection<Ticket> getTokens() {
return ticketRegistry.getTickets(ticket -> (ticket instanceof AccessToken || ticket instanceof RefreshToken) && !ticket.isExpired())
.sorted(Comparator.comparing(Ticket::getId))
.collect(Collectors.toList());
} | java | @ReadOperation
public Collection<Ticket> getTokens() {
return ticketRegistry.getTickets(ticket -> (ticket instanceof AccessToken || ticket instanceof RefreshToken) && !ticket.isExpired())
.sorted(Comparator.comparing(Ticket::getId))
.collect(Collectors.toList());
} | [
"@",
"ReadOperation",
"public",
"Collection",
"<",
"Ticket",
">",
"getTokens",
"(",
")",
"{",
"return",
"ticketRegistry",
".",
"getTickets",
"(",
"ticket",
"->",
"(",
"ticket",
"instanceof",
"AccessToken",
"||",
"ticket",
"instanceof",
"RefreshToken",
")",
"&&",... | Gets access tokens.
@return the access tokens | [
"Gets",
"access",
"tokens",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/mgmt/OAuth20TokenManagementEndpoint.java#L46-L51 |
126,898 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/mgmt/OAuth20TokenManagementEndpoint.java | OAuth20TokenManagementEndpoint.getToken | @ReadOperation
public Ticket getToken(@Selector final String ticketId) {
var ticket = (Ticket) ticketRegistry.getTicket(ticketId, AccessToken.class);
if (ticket == null) {
ticket = ticketRegistry.getTicket(ticketId, RefreshToken.class);
}
if (ticket == null) {
... | java | @ReadOperation
public Ticket getToken(@Selector final String ticketId) {
var ticket = (Ticket) ticketRegistry.getTicket(ticketId, AccessToken.class);
if (ticket == null) {
ticket = ticketRegistry.getTicket(ticketId, RefreshToken.class);
}
if (ticket == null) {
... | [
"@",
"ReadOperation",
"public",
"Ticket",
"getToken",
"(",
"@",
"Selector",
"final",
"String",
"ticketId",
")",
"{",
"var",
"ticket",
"=",
"(",
"Ticket",
")",
"ticketRegistry",
".",
"getTicket",
"(",
"ticketId",
",",
"AccessToken",
".",
"class",
")",
";",
... | Gets access token.
@param ticketId the ticket id
@return the access token | [
"Gets",
"access",
"token",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/mgmt/OAuth20TokenManagementEndpoint.java#L60-L75 |
126,899 | apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/mgmt/OAuth20TokenManagementEndpoint.java | OAuth20TokenManagementEndpoint.deleteToken | @DeleteOperation
public void deleteToken(@Selector final String ticketId) {
val ticket = getToken(ticketId);
if (ticket != null) {
ticketRegistry.deleteTicket(ticketId);
}
} | java | @DeleteOperation
public void deleteToken(@Selector final String ticketId) {
val ticket = getToken(ticketId);
if (ticket != null) {
ticketRegistry.deleteTicket(ticketId);
}
} | [
"@",
"DeleteOperation",
"public",
"void",
"deleteToken",
"(",
"@",
"Selector",
"final",
"String",
"ticketId",
")",
"{",
"val",
"ticket",
"=",
"getToken",
"(",
"ticketId",
")",
";",
"if",
"(",
"ticket",
"!=",
"null",
")",
"{",
"ticketRegistry",
".",
"delete... | Delete access token.
@param ticketId the ticket id | [
"Delete",
"access",
"token",
"."
] | b4b306433a8782cef803a39bea5b1f96740e0e9b | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/mgmt/OAuth20TokenManagementEndpoint.java#L82-L88 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.