Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Use const values to handle layout / entries well known values and generate strings instead of hardcoding them #626

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Commits on Dec 2, 2024

  1. brokers: Move auth results to auth package so that can be used everyw…

    …here
    
    We were duplicating this in the example broker, so let's make the same
    content be available everywhere.
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    54f0b23 View commit details
    Browse the repository at this point in the history
  2. cleanup: Define layout type names as constants and reuse them in code

    Avoid (re)using string values for layout types as is, since they are
    prone to errors and they're hard to maintain.
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    61e5f90 View commit details
    Browse the repository at this point in the history
  3. cleanup: Define entries names as constants and reuse them in code

    Avoid (re)using string values for entries types as is, since they are
    prone to errors and they're hard to maintain.
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    f91b628 View commit details
    Browse the repository at this point in the history
  4. brokers/layouts: Add simple formatter for optional/required items

    Avoid building the list manually now that we've consts values and use
    this for both optional booleans and supported entries
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    6089ab3 View commit details
    Browse the repository at this point in the history
  5. brokers/layouts: Add parser for joined layout items

    It can be used to parse optional or required values or entries.
    
    Use this both in broker and example brokers logic
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    499ba6a View commit details
    Browse the repository at this point in the history
  6. cleanup: Use layouts.True instead of strings

    Avoid repeating the same string allover the places
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    49ae45e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ef4d0fd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    61efcce View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b303302 View commit details
    Browse the repository at this point in the history
  10. examplebroker: Simplify auth modes handling by using a maps of structs

    We were using a maps of maps that made code hard to read and maintain
    and doing some unneeded conversions to json back and forth.
    
    Avoid this by just using structured data instead
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    b56fe49 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6b00485 View commit details
    Browse the repository at this point in the history
  12. examplebroker: Define authentication modes we support globally

    So that we can reuse their ID across the file without further constants
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    28aea30 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    812c19b View commit details
    Browse the repository at this point in the history
  14. services/pam: Set qrcode rendering to false if the flag is false

    It's what the oidc broker expects to be set in case the rendering is not
    supported, while we were unsetting the value by default.
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    74c4885 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1406c4c View commit details
    Browse the repository at this point in the history
  16. cleanup: Move authd protocol definitions to internal library

    We don't need to expose the proto externally, since we are now re-usable
    so if something of it has to be exposed we should do it manually
    3v1n0 committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    2c67ae2 View commit details
    Browse the repository at this point in the history