• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sgerrand / ex_teya / 36341592680
100%

Build:
DEFAULT BRANCH: main
Ran 27 Sep 2026 06:42PM UTC
Jobs 1
Files 24
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Sep 2026 06:41PM UTC coverage: 100.0%. Remained the same
36341592680

push

github

web-flow
feat: name several sets of credentials, each with its own token (#53)

* feat: name several sets of credentials, each with its own token

The library ran one set of credentials, so an application could not use
Online Payments and POSLink together: POSLink needs the client that ePOS
registration returns, once per store. And since every scope went in one
token request, one scope a client lacked stopped every call.

Sets can now be named under config :teya, credentials: [...], each with
its own client_id, client_secret and scopes. The application starts an
auth process for each, registered in Teya.AuthRegistry, beside the one
for the top-level credentials. Each set asks only for its own scopes.

A call uses the set named with its :credentials option, else :poslink
for a POSLink path or :online for any other when that set is configured,
else the top-level credentials. So the common case needs no call to
change, and another store's client is credentials: :store_b away. An
unknown name raises ArgumentError before any request, in the caller's
process for the streaming functions too, which gain an options argument:
Payment.subscribe/3 and Receipt.subscribe_status/3. A retry asks the
same set for its current token.

The top-level :client_id, :client_secret and :scopes work as before, as
the fallback for every call.

* fix(auth): route by the sets started at boot, and check their config

subscribe/3 and subscribe_status/3 had two default arguments, so a call
with options and no pid, such as subscribe(id, credentials: :store_b),
bound the options to pid: the stream used the default credentials and
sent its events to a list. Options in that place are now for the calling
process.

set_for/2 read the live :credentials config, while auth processes start
only at boot, so a set added or removed while running routed calls to a
process that was not there. It now goes by the names the application
started with, kept in a persistent term. credentials: :default picks the
to... (continued)

75 of 75 new or added lines in 6 files covered. (100.0%)

451 of 451 relevant lines covered (100.0%)

45.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 36341592680.1 27 Sep 2026 06:42PM UTC 24
100.0
GitHub Action Run
Source Files on build 36341592680
  • Tree
  • List 24
  • Changed 7
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36341592680
  • a2aa198f on github
  • Prev Build on main (#36339958017)
  • Next Build on main (#36345917173)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc