Skip to content

chore: added http Spel function category and functions for fcli actions#1046

Merged
rsenden merged 4 commits into
fortify:dev/v3.xfrom
kadraman:spel-func-basicAuth
Jul 1, 2026
Merged

chore: added http Spel function category and functions for fcli actions#1046
rsenden merged 4 commits into
fortify:dev/v3.xfrom
kadraman:spel-func-basicAuth

Conversation

@kadraman

@kadraman kadraman commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Changes made:

  • Added new Spel function category http
  • Added new SpEL functions base64Decode, base64Encode to util category
  • Added new SpEL functions basicAuth, bearerAuth, urlDecode, urlEncode to http category
  • Moved uriPart function to category http

All functions are null safe.

Example usage in action YAML (with fixed expression syntax):

Authorization: "${#basicAuth(cli['sonatype-username'], cli['sonatype-password'])}"

I did not change action schema version in gradle.properties

Copilot AI review requested due to automatic review settings July 1, 2026 11:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new standard SpEL utility function to help fcli actions generate HTTP Authorization headers for Basic Authentication, enabling easier integration with services that require basic auth credentials.

Changes:

  • Added a new #basicAuth(username, password) SpEL function in util category that returns Basic <base64(username:password)>.
  • Ensured encoding uses UTF-8 and Base64 encoding; null username/password are treated as empty strings.

@kadraman kadraman changed the title chore: added basicAuth Spel function to enable creation of Basic Authentication header in fcli actions chore: added http Spel function category and functions for fcli actions Jul 1, 2026
@rsenden rsenden closed this in 2ac1546 Jul 1, 2026
@rsenden rsenden merged commit 2ac1546 into fortify:dev/v3.x Jul 1, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants