Skip to content

feat(sms-authenticator) add option to specify api secret header - #395

Closed
petrsni wants to merge 2 commits into
netzbegruenung:mainfrom
petrsni:pr/sms-auth-header-option
Closed

feat(sms-authenticator) add option to specify api secret header#395
petrsni wants to merge 2 commits into
netzbegruenung:mainfrom
petrsni:pr/sms-auth-header-option

Conversation

@petrsni

@petrsni petrsni commented Jun 15, 2026

Copy link
Copy Markdown

Summary

Adds a new apiTokenHeaderField configuration option to the SMS authenticator, allowing to specify which HTTP header is used to transmit the API secret instead of always defaulting to Authorization.

Motivation

  • Some SMS gateway APIs use non-standard authentication header names (e.g. access-token, api-key) instead of Authorization

Changes

SmsAuthenticatorFactory.java

  • Added new apiTokenHeaderField config property (type String, defaults to Authorization)

ApiSmsService.java

  • Read apiTokenHeaderField from config in the constructor (defaults to Authorization)
  • Use apiTokenHeaderField instead of the hardcoded string "Authorization" when setting the auth header for both token-based and Basic Auth requests

Backward Compatibility

  • Fully backward compatible — the default value is Authorization, so all existing configurations continue to work unchanged without any migration

@petrsni petrsni changed the title feat(sms-authenticator) add option to specify api seacret header feat(sms-authenticator) add option to specify api secret header Jun 15, 2026
@melegiul

melegiul commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks! Should be solved here similar with the attribute option
#367

@melegiul melegiul closed this Aug 7, 2026
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.

2 participants