Implement FR #3209: Add native support for authentication via Intune dbus interface (#3274)

* Adds support for calling `acquireTokenInteractively` and `acquireTokenSilently` via D-Bus
* Parses and handles the full `brokerTokenResponse` object returned by the Intune broker
* Stores and reuses `account` data to enable silent token refresh without repeated interactive authentication
* Ensures the access token and its expiry time are properly calculated and stored for consistent token management
* Fallback to interactive authentication is triggered if silent authentication fails
This commit is contained in:
abraunegg 2025-05-26 17:14:50 +10:00 committed by GitHub
commit 61e5a1edb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 847 additions and 175 deletions

View file

@ -11,7 +11,7 @@ RUN go install -ldflags "-s -w" github.com/tianon/gosu@${GOSU_VERSION}
FROM fedora:${FEDORA_VERSION} AS builder-onedrive
RUN dnf install -y ldc pkgconf libcurl-devel sqlite-devel git awk
RUN dnf install -y ldc pkgconf libcurl-devel sqlite-devel dbus-devel git awk
ENV PKG_CONFIG=/usr/bin/pkgconf

View file

@ -10,7 +10,7 @@ RUN go install -ldflags "-s -w" github.com/tianon/gosu@${GOSU_VERSION}
FROM alpine:${ALPINE_VERSION} AS builder-onedrive
RUN apk add --update --no-cache alpine-sdk gnupg xz curl-dev sqlite-dev binutils-gold autoconf automake ldc
RUN apk add --update --no-cache alpine-sdk gnupg xz curl-dev sqlite-dev dbus-dev binutils-gold autoconf automake ldc
COPY . /usr/src/onedrive
WORKDIR /usr/src/onedrive

View file

@ -10,7 +10,7 @@ RUN apt-get clean \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential curl ca-certificates libcurl4-openssl-dev libsqlite3-dev libxml2-dev pkg-config git ldc \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential curl ca-certificates libcurl4-openssl-dev libsqlite3-dev libxml2-dev libdbus-1-dev pkg-config git ldc \
# Install|update curl from backports
&& apt-get install -t bookworm-backports -y curl \
&& rm -rf /var/lib/apt/lists/*