Input buildinfo: https://buildinfos.debian.net/buildinfo-pool/r/ruby-rack-oauth2/ruby-rack-oauth2_1.19.0-1_all.buildinfo Use metasnap for getting required timestamps New buildinfo file: /tmp/ruby-rack-oauth2-1.19.0-1hp0kr4dn/ruby-rack-oauth2_1.19.0-1_all.buildinfo Get source package info: ruby-rack-oauth2=1.19.0-1 Source URL: http://snapshot.notset.fr/mr/package/ruby-rack-oauth2/1.19.0-1/srcfiles?fileinfo=1 env -i PATH=/usr/sbin:/usr/bin:/sbin:/bin TMPDIR=/tmp mmdebstrap --arch=amd64 --include=adduser=3.118 autoconf=2.71-2 automake=1:1.16.5-1.1 autopoint=0.21-4 autotools-dev=20180224.1+nmu1 base-files=12 base-passwd=3.5.52 bash=5.1-3.1 binutils=2.37-10 binutils-common=2.37-10 binutils-x86-64-linux-gnu=2.37-10 bsdextrautils=2.37.2-4 bsdutils=1:2.37.2-4 build-essential=12.9 bzip2=1.0.8-4 ca-certificates=20211016 coreutils=8.32-4.1 cpp=4:11.2.0-2 cpp-11=11.2.0-12 dash=0.5.11+git20210903+057cd650a4ed-3 debconf=1.5.79 debhelper=13.5.2 debianutils=5.5-1 devscripts=2.21.5 dh-autoreconf=20 dh-strip-nondeterminism=1.12.1-1 diffutils=1:3.7-5 dirmngr=2.2.27-2 dpkg=1.20.9 dpkg-dev=1.20.9 dwz=0.14-1 fakeroot=1.26-1 file=1:5.41-2 findutils=4.8.0-1 g++=4:11.2.0-2 g++-11=11.2.0-12 gcc=4:11.2.0-2 gcc-11=11.2.0-12 gcc-11-base=11.2.0-12 gem2deb=1.7 gem2deb-test-runner=1.7 gettext=0.21-4 gettext-base=0.21-4 gnupg=2.2.27-2 gnupg-l10n=2.2.27-2 gnupg-utils=2.2.27-2 gpg=2.2.27-2 gpg-agent=2.2.27-2 gpg-wks-client=2.2.27-2 gpg-wks-server=2.2.27-2 gpgconf=2.2.27-2 gpgsm=2.2.27-2 gpgv=2.2.27-2 grep=3.7-1 groff-base=1.22.4-7 gzip=1.10-4 hostname=3.23 init-system-helpers=1.60 intltool-debian=0.35.0+20060710.5 libacl1=2.3.1-1 libarchive-zip-perl=1.68-1 libasan6=11.2.0-12 libassuan0=2.5.5-1 libatomic1=11.2.0-12 libattr1=1:2.5.1-1 libaudit-common=1:3.0.6-1 libaudit1=1:3.0.6-1+b1 libb-hooks-op-check-perl=0.22-1+b3 libbinutils=2.37-10 libblkid1=2.37.2-4 libbsd0=0.11.3-1 libbz2-1.0=1.0.8-4 libc-bin=2.32-4 libc-dev-bin=2.32-4 libc6=2.32-4 libc6-dev=2.32-4 libcap-ng0=0.7.9-2.2+b1 libcap2=1:2.44-1 libcc1-0=11.2.0-12 libclass-method-modifiers-perl=2.13-1 libcom-err2=1.46.4-1 libcrypt-dev=1:4.4.26-1 libcrypt1=1:4.4.26-1 libctf-nobfd0=2.37-10 libctf0=2.37-10 libdb5.3=5.3.28+dfsg1-0.8 libdebconfclient0=0.261 libdebhelper-perl=13.5.2 libdevel-callchecker-perl=0.008-1+b2 libdpkg-perl=1.20.9 libdynaloader-functions-perl=0.003-1.1 libedit2=3.1-20210910-1 libelf1=0.186-1 libencode-locale-perl=1.05-1.1 libexpat1=2.4.1-3 libfakeroot=1.26-1 libffi8=3.4.2-3 libfile-dirlist-perl=0.05-2 libfile-homedir-perl=1.006-1 libfile-listing-perl=6.14-1 libfile-stripnondeterminism-perl=1.12.1-1 libfile-touch-perl=0.12-1 libfile-which-perl=1.23-1 libgcc-11-dev=11.2.0-12 libgcc-s1=11.2.0-12 libgcrypt20=1.9.4-3+b1 libgdbm-compat4=1.22-1 libgdbm6=1.22-1 libgmp-dev=2:6.2.1+dfsg-3 libgmp10=2:6.2.1+dfsg-3 libgmpxx4ldbl=2:6.2.1+dfsg-3 libgnutls30=3.7.2-2 libgomp1=11.2.0-12 libgpg-error0=1.42-3 libgssapi-krb5-2=1.18.3-7 libhogweed6=3.7.3-1 libhtml-parser-perl=3.76-1 libhtml-tagset-perl=3.20-4 libhtml-tree-perl=5.07-2 libhttp-cookies-perl=6.10-1 libhttp-date-perl=6.05-1 libhttp-message-perl=6.35-1 libhttp-negotiate-perl=6.01-1 libicu67=67.1-7 libidn2-0=2.3.2-2 libimport-into-perl=1.002005-1 libio-html-perl=1.004-2 libio-pty-perl=1:1.15-2 libio-socket-ssl-perl=2.072-1 libipc-run-perl=20200505.0-1 libisl23=0.24-2 libitm1=11.2.0-12 libk5crypto3=1.18.3-7 libkeyutils1=1.6.1-2 libkrb5-3=1.18.3-7 libkrb5support0=1.18.3-7 libksba8=1.6.0-2 libldap-2.4-2=2.4.59+dfsg-1 liblsan0=11.2.0-12 liblwp-mediatypes-perl=6.04-1 liblwp-protocol-https-perl=6.10-1 liblz4-1=1.9.3-2 liblzma5=5.2.5-2 libmagic-mgc=1:5.41-2 libmagic1=1:5.41-2 libmd0=1.0.4-1 libmodule-runtime-perl=0.016-1 libmoo-perl=2.005004-2 libmount1=2.37.2-4 libmpc3=1.2.1-1 libmpdec3=2.5.1-2 libmpfr6=4.1.0-3 libncursesw6=6.3-1 libnet-http-perl=6.21-1 libnet-ssleay-perl=1.90-1 libnettle8=3.7.3-1 libnpth0=1.6-3 libnsl-dev=1.3.0-2 libnsl2=1.3.0-2 libp11-kit0=0.24.0-5 libpam-modules=1.4.0-10 libpam-modules-bin=1.4.0-10 libpam-runtime=1.4.0-10 libpam0g=1.4.0-10 libparams-classify-perl=0.015-1+b3 libpcre2-8-0=10.39-3 libpcre3=2:8.39-13 libperl5.32=5.32.1-6 libpipeline1=1.5.4-1 libpython3-stdlib=3.9.8-1 libpython3.9-minimal=3.9.9-1 libpython3.9-stdlib=3.9.9-1 libquadmath0=11.2.0-12 libreadline8=8.1-2 librole-tiny-perl=2.002004-1 libruby2.7=2.7.4-1+b1 libruby3.0=3.0.2-5 libsasl2-2=2.1.27+dfsg2-2 libsasl2-modules-db=2.1.27+dfsg2-2 libseccomp2=2.5.3-2 libselinux1=3.3-1+b1 libsemanage-common=3.3-1 libsemanage2=3.3-1+b1 libsepol2=3.3-1 libsigsegv2=2.13-1 libsmartcols1=2.37.2-4 libsqlite3-0=3.36.0-2 libssl1.1=1.1.1l-1 libstdc++-11-dev=11.2.0-12 libstdc++6=11.2.0-12 libsub-override-perl=0.09-2 libsub-quote-perl=2.006006-1 libsystemd0=249.7-1 libtasn1-6=4.18.0-4 libtimedate-perl=2.3300-2 libtinfo6=6.3-1 libtirpc-common=1.3.2-2 libtirpc-dev=1.3.2-2 libtirpc3=1.3.2-2 libtool=2.4.6-15 libtry-tiny-perl=0.30-1 libtsan0=11.2.0-12 libubsan1=11.2.0-12 libuchardet0=0.0.7-1 libudev1=249.7-1 libunistring2=0.9.10-6 liburi-perl=5.10-1 libuuid1=2.37.2-4 libwww-perl=6.58-1 libwww-robotrules-perl=6.02-1 libxml2=2.9.12+dfsg-5+b1 libyaml-0-2=0.2.2-1 libzstd1=1.4.8+dfsg-3 linux-libc-dev=5.15.3-1 login=1:4.8.1-2 lsb-base=11.1.0 m4=1.4.18-5 make=4.3-4.1 man-db=2.9.4-2 mawk=1.3.4.20200120-2 media-types=4.0.0 ncurses-base=6.3-1 ncurses-bin=6.3-1 netbase=6.3 openssl=1.1.1l-1 passwd=1:4.8.1-2 patch=2.7.6-7 patchutils=0.4.2-1 perl=5.32.1-6 perl-base=5.32.1-6 perl-modules-5.32=5.32.1-6 perl-openssl-defaults=5 pinentry-curses=1.1.0-4 po-debconf=1.0.21+nmu1 publicsuffix=20211109.1735-1 python3=3.9.8-1 python3-minimal=3.9.8-1 python3.9=3.9.9-1 python3.9-minimal=3.9.9-1 rake=13.0.3-1 readline-common=8.1-2 rpcsvc-proto=1.4.2-4 ruby=1:2.7.6 ruby-activesupport=2:6.1.4.1+dfsg-5 ruby-addressable=2.8.0-1 ruby-aes-key-wrap=1.0.1-1.1 ruby-all-dev=1:2.7.6 ruby-attr-required=1.0.0-2.1 ruby-bindata=2.4.8-1 ruby-concurrent=1.1.6+dfsg-3 ruby-crack=0.4.4-2 ruby-diff-lcs=1.4.4-1 ruby-domain-name=0.5.20190701-1 ruby-hashdiff=1.0.1-1 ruby-http-cookie=1.0.3-1 ruby-httpclient=2.8.3-4 ruby-i18n=1.8.11-1 ruby-json-jwt=1.13.0-1 ruby-minitest=5.13.0-1 ruby-multi-json=1.14.1-1 ruby-net-telnet=0.1.1-2 ruby-power-assert=1.1.7-2 ruby-public-suffix=4.0.6+ds-1 ruby-rack=2.1.4-4 ruby-rspec=3.10.0c1e1m2s3-1 ruby-rspec-core=3.10.0c1e1m2s3-1 ruby-rspec-expectations=3.10.0c1e1m2s3-1 ruby-rspec-its=1.3.0-1 ruby-rspec-mocks=3.10.0c1e1m2s3-1 ruby-rspec-support=3.10.0c1e1m2s3-1 ruby-rubygems=3.2.27-3 ruby-safe-yaml=1.0.5-1 ruby-test-unit=3.3.9-1 ruby-tzinfo=2.0.4-3 ruby-unf=0.1.4-2 ruby-unf-ext=0.0.7.7-1+b1 ruby-webmock=3.8.3-1 ruby-xmlrpc=0.3.2-1 ruby-zeitwerk=2.4.2-1 ruby2.7=2.7.4-1+b1 ruby2.7-dev=2.7.4-1+b1 ruby3.0=3.0.2-5 ruby3.0-dev=3.0.2-5 rubygems-integration=1.18 sed=4.8-1 sensible-utils=0.0.17 sysvinit-utils=3.00-1 tar=1.34+dfsg-1 tzdata=2021e-1 util-linux=2.37.2-4 wdiff=1.2.2-2+b1 xz-utils=5.2.5-2 zlib1g=1:1.2.11.dfsg-2 --variant=apt --aptopt=Acquire::Check-Valid-Until "false" --aptopt=Acquire::http::Dl-Limit "1000"; --aptopt=Acquire::https::Dl-Limit "1000"; --aptopt=Acquire::Retries "5"; --aptopt=APT::Get::allow-downgrades "true"; --keyring=/usr/share/keyrings/ --essential-hook=chroot "$1" sh -c "apt-get --yes install fakeroot util-linux" --essential-hook=copy-in /usr/share/keyrings/debian-archive-bullseye-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-stable.gpg /usr/share/keyrings/debian-archive-buster-automatic.gpg /usr/share/keyrings/debian-archive-buster-security-automatic.gpg /usr/share/keyrings/debian-archive-buster-stable.gpg /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-archive-removed-keys.gpg /usr/share/keyrings/debian-archive-stretch-automatic.gpg /usr/share/keyrings/debian-archive-stretch-security-automatic.gpg /usr/share/keyrings/debian-archive-stretch-stable.gpg /usr/share/keyrings/debian-ports-archive-keyring-removed.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg /usr/share/keyrings/debian-keyring.gpg /etc/apt/trusted.gpg.d/ --essential-hook=chroot "$1" sh -c "rm /etc/apt/sources.list && echo 'deb http://snapshot.notset.fr/archive/debian/20211127T030531Z/ bookworm main deb-src http://snapshot.notset.fr/archive/debian/20211127T030531Z/ bookworm main deb http://snapshot.notset.fr/archive/debian/20211126T150138Z/ unstable main' >> /etc/apt/sources.list && apt-get update" --customize-hook=chroot "$1" useradd --no-create-home -d /nonexistent -p "" builduser -s /bin/bash --customize-hook=chroot "$1" env sh -c "apt-get source --only-source -d ruby-rack-oauth2=1.19.0-1 && mkdir -p /build/ruby-rack-oauth2-3c8zeb && dpkg-source --no-check -x /*.dsc /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0 && chown -R builduser:builduser /build/ruby-rack-oauth2-3c8zeb" --customize-hook=chroot "$1" env --unset=TMPDIR runuser builduser -c "cd /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0 && env DEB_BUILD_OPTIONS="parallel=4" LC_ALL="C.UTF-8" LC_COLLATE="C.UTF-8" SOURCE_DATE_EPOCH="1637845711" dpkg-buildpackage -uc -a amd64 --build=all" --customize-hook=sync-out /build/ruby-rack-oauth2-3c8zeb /tmp/ruby-rack-oauth2-1.19.0-1hp0kr4dn bookworm /dev/null deb http://snapshot.notset.fr/archive/debian/20211126T150138Z unstable main I: automatically chosen mode: root I: chroot architecture amd64 is equal to the host's architecture I: automatically chosen format: tar I: using /tmp/mmdebstrap.928efOTZnz as tempdir I: running apt-get update... I: downloading packages with apt... I: extracting archives... I: installing essential packages... I: running --essential-hook in shell: sh -c 'chroot "$1" sh -c "apt-get --yes install fakeroot util-linux"' exec /tmp/mmdebstrap.928efOTZnz Reading package lists... Building dependency tree... util-linux is already the newest version (2.37.2-4). The following NEW packages will be installed: fakeroot libfakeroot 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 134 kB of archives. After this operation, 397 kB of additional disk space will be used. Get:1 http://snapshot.notset.fr/archive/debian/20211126T150138Z unstable/main amd64 libfakeroot amd64 1.26-1 [47.3 kB] Get:2 http://snapshot.notset.fr/archive/debian/20211126T150138Z unstable/main amd64 fakeroot amd64 1.26-1 [87.1 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 134 kB in 0s (1022 kB/s) Selecting previously unselected package libfakeroot:amd64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 4672 files and directories currently installed.) Preparing to unpack .../libfakeroot_1.26-1_amd64.deb ... Unpacking libfakeroot:amd64 (1.26-1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../fakeroot_1.26-1_amd64.deb ... Unpacking fakeroot (1.26-1) ... Setting up libfakeroot:amd64 (1.26-1) ... Setting up fakeroot (1.26-1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode Processing triggers for libc-bin (2.32-4) ... I: running special hook: copy-in /usr/share/keyrings/debian-archive-bullseye-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-stable.gpg /usr/share/keyrings/debian-archive-buster-automatic.gpg /usr/share/keyrings/debian-archive-buster-security-automatic.gpg /usr/share/keyrings/debian-archive-buster-stable.gpg /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-archive-removed-keys.gpg /usr/share/keyrings/debian-archive-stretch-automatic.gpg /usr/share/keyrings/debian-archive-stretch-security-automatic.gpg /usr/share/keyrings/debian-archive-stretch-stable.gpg /usr/share/keyrings/debian-ports-archive-keyring-removed.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg /usr/share/keyrings/debian-keyring.gpg /etc/apt/trusted.gpg.d/ I: running --essential-hook in shell: sh -c 'chroot "$1" sh -c "rm /etc/apt/sources.list && echo 'deb http://snapshot.notset.fr/archive/debian/20211127T030531Z/ bookworm main deb-src http://snapshot.notset.fr/archive/debian/20211127T030531Z/ bookworm main deb http://snapshot.notset.fr/archive/debian/20211126T150138Z/ unstable main' >> /etc/apt/sources.list && apt-get update"' exec /tmp/mmdebstrap.928efOTZnz Get:1 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm InRelease [129 kB] Hit:2 http://snapshot.notset.fr/archive/debian/20211126T150138Z unstable InRelease Ign:3 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main Sources Ign:4 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main amd64 Packages Ign:3 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main Sources Ign:4 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main amd64 Packages Ign:3 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main Sources Ign:4 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main amd64 Packages Get:3 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main Sources [11.7 MB] Get:4 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main amd64 Packages [11.2 MB] Fetched 23.0 MB in 19s (1182 kB/s) Reading package lists... I: installing remaining packages inside the chroot... I: running --customize-hook in shell: sh -c 'chroot "$1" useradd --no-create-home -d /nonexistent -p "" builduser -s /bin/bash' exec /tmp/mmdebstrap.928efOTZnz I: running --customize-hook in shell: sh -c 'chroot "$1" env sh -c "apt-get source --only-source -d ruby-rack-oauth2=1.19.0-1 && mkdir -p /build/ruby-rack-oauth2-3c8zeb && dpkg-source --no-check -x /*.dsc /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0 && chown -R builduser:builduser /build/ruby-rack-oauth2-3c8zeb"' exec /tmp/mmdebstrap.928efOTZnz Reading package lists... NOTICE: 'ruby-rack-oauth2' packaging is maintained in the 'Git' version control system at: https://salsa.debian.org/ruby-team/ruby-rack-oauth2.git Please use: git clone https://salsa.debian.org/ruby-team/ruby-rack-oauth2.git to retrieve the latest (possibly unreleased) updates to the package. Need to get 38.0 kB of source archives. Get:1 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main ruby-rack-oauth2 1.19.0-1 (dsc) [2252 B] Get:2 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main ruby-rack-oauth2 1.19.0-1 (tar) [31.9 kB] Get:3 http://snapshot.notset.fr/archive/debian/20211127T030531Z bookworm/main ruby-rack-oauth2 1.19.0-1 (diff) [3920 B] Fetched 38.0 kB in 0s (534 kB/s) Download complete and in download only mode W: Download is performed unsandboxed as root as file 'ruby-rack-oauth2_1.19.0-1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) dpkg-source: info: extracting ruby-rack-oauth2 in /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0 dpkg-source: info: unpacking ruby-rack-oauth2_1.19.0.orig.tar.gz dpkg-source: info: unpacking ruby-rack-oauth2_1.19.0-1.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying patch-out-simplecov.patch I: running --customize-hook in shell: sh -c 'chroot "$1" env --unset=TMPDIR runuser builduser -c "cd /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0 && env DEB_BUILD_OPTIONS="parallel=4" LC_ALL="C.UTF-8" LC_COLLATE="C.UTF-8" SOURCE_DATE_EPOCH="1637845711" dpkg-buildpackage -uc -a amd64 --build=all"' exec /tmp/mmdebstrap.928efOTZnz dpkg-buildpackage: info: source package ruby-rack-oauth2 dpkg-buildpackage: info: source version 1.19.0-1 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Daniel Leidert dpkg-source --before-build . debian/rules clean dh clean --buildsystem=ruby --with ruby dh_auto_clean -O--buildsystem=ruby dh_ruby --clean dh_ruby --clean dh_autoreconf_clean -O--buildsystem=ruby dh_clean -O--buildsystem=ruby debian/rules binary-indep dh binary-indep --buildsystem=ruby --with ruby dh_update_autotools_config -i -O--buildsystem=ruby dh_autoreconf -i -O--buildsystem=ruby dh_auto_configure -i -O--buildsystem=ruby dh_ruby --configure dh_auto_build -i -O--buildsystem=ruby dh_ruby --build dh_ruby --build dh_auto_test -i -O--buildsystem=ruby dh_ruby --test create-stamp debian/debhelper-build-stamp dh_testroot -i -O--buildsystem=ruby dh_prep -i -O--buildsystem=ruby dh_auto_install --destdir=debian/ruby-rack-oauth2/ -i -O--buildsystem=ruby dh_ruby --install /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2 dh_ruby --install /usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20211201-391916-17oewcm/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: open-ended dependency on rack (>= 2.1.0) is not recommended if rack is semantically versioned, use: add_runtime_dependency 'rack', '~> 2.1', '>= 2.1.0' WARNING: open-ended dependency on httpclient (>= 0) is not recommended use a bounded requirement, such as '~> x.y' WARNING: open-ended dependency on activesupport (>= 0) is not recommended use a bounded requirement, such as '~> x.y' WARNING: open-ended dependency on attr_required (>= 0) is not recommended use a bounded requirement, such as '~> x.y' WARNING: open-ended dependency on json-jwt (>= 1.11.0) is not recommended if json-jwt is semantically versioned, use: add_runtime_dependency 'json-jwt', '~> 1.11', '>= 1.11.0' WARNING: open-ended dependency on rake (>= 0, development) is not recommended use a bounded requirement, such as '~> x.y' WARNING: open-ended dependency on rspec (>= 0, development) is not recommended use a bounded requirement, such as '~> x.y' WARNING: open-ended dependency on rspec-its (>= 0, development) is not recommended use a bounded requirement, such as '~> x.y' WARNING: open-ended dependency on webmock (>= 0, development) is not recommended use a bounded requirement, such as '~> x.y' WARNING: See https://guides.rubygems.org/specification-reference/ for help Successfully built RubyGem Name: rack-oauth2 Version: 1.19.0 File: rack-oauth2-1.19.0.gem /usr/bin/ruby2.7 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-rack-oauth2/usr/share/rubygems-integration/all /tmp/d20211201-391916-17oewcm/rack-oauth2-1.19.0.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/VERSION /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token/authenticator.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token/bearer.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token/legacy.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token/mac.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token/mac/sha256_hex_verifier.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token/mac/signature.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token/mac/verifier.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/access_token/mtls.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/error.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/grant.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/grant/authorization_code.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/grant/client_credentials.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/grant/jwt_bearer.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/grant/password.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/grant/refresh_token.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/grant/saml2_bearer.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/client/grant/token_exchange.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/debugger.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/debugger/request_filter.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/abstract.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/abstract/error.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/abstract/handler.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/abstract/request.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/abstract/response.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/authorize.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/authorize/code.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/authorize/error.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/authorize/extension.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/authorize/extension/code_and_token.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/authorize/token.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/extension.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/extension/pkce.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/extension/response_mode.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/rails.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/rails/authorize.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/rails/response_ext.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/resource.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/resource/bearer.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/resource/bearer/error.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/resource/error.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/resource/mac.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/resource/mac/error.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/authorization_code.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/client_credentials.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/error.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/extension.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/extension/example.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/jwt_bearer.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/password.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/refresh_token.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/server/token/saml2_bearer.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/urn.rb /build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all/gems/rack-oauth2-1.19.0/lib/rack/oauth2/util.rb Successfully installed rack-oauth2-1.19.0 1 gem installed cd debian/ruby-rack-oauth2/usr/share/rubygems-integration/all rm -rf bin rm -rf build_info rm -rf cache rm -rf doc rm -rf extensions rmdir plugins cd gems/rack-oauth2-1.19.0 rm -f chmod 644 lib/rack/oauth2.rb lib/rack/oauth2/access_token.rb lib/rack/oauth2/access_token/authenticator.rb lib/rack/oauth2/access_token/bearer.rb lib/rack/oauth2/access_token/legacy.rb lib/rack/oauth2/access_token/mac.rb lib/rack/oauth2/access_token/mac/sha256_hex_verifier.rb lib/rack/oauth2/access_token/mac/signature.rb lib/rack/oauth2/access_token/mac/verifier.rb lib/rack/oauth2/access_token/mtls.rb lib/rack/oauth2/client.rb lib/rack/oauth2/client/error.rb lib/rack/oauth2/client/grant.rb lib/rack/oauth2/client/grant/authorization_code.rb lib/rack/oauth2/client/grant/client_credentials.rb lib/rack/oauth2/client/grant/jwt_bearer.rb lib/rack/oauth2/client/grant/password.rb lib/rack/oauth2/client/grant/refresh_token.rb lib/rack/oauth2/client/grant/saml2_bearer.rb lib/rack/oauth2/client/grant/token_exchange.rb lib/rack/oauth2/debugger.rb lib/rack/oauth2/debugger/request_filter.rb lib/rack/oauth2/server.rb lib/rack/oauth2/server/abstract.rb lib/rack/oauth2/server/abstract/error.rb lib/rack/oauth2/server/abstract/handler.rb lib/rack/oauth2/server/abstract/request.rb lib/rack/oauth2/server/abstract/response.rb lib/rack/oauth2/server/authorize.rb lib/rack/oauth2/server/authorize/code.rb lib/rack/oauth2/server/authorize/error.rb lib/rack/oauth2/server/authorize/extension.rb lib/rack/oauth2/server/authorize/extension/code_and_token.rb lib/rack/oauth2/server/authorize/token.rb lib/rack/oauth2/server/extension.rb lib/rack/oauth2/server/extension/pkce.rb lib/rack/oauth2/server/extension/response_mode.rb lib/rack/oauth2/server/rails.rb lib/rack/oauth2/server/rails/authorize.rb lib/rack/oauth2/server/rails/response_ext.rb lib/rack/oauth2/server/resource.rb lib/rack/oauth2/server/resource/bearer.rb lib/rack/oauth2/server/resource/bearer/error.rb lib/rack/oauth2/server/resource/error.rb lib/rack/oauth2/server/resource/mac.rb lib/rack/oauth2/server/resource/mac/error.rb lib/rack/oauth2/server/token.rb lib/rack/oauth2/server/token/authorization_code.rb lib/rack/oauth2/server/token/client_credentials.rb lib/rack/oauth2/server/token/error.rb lib/rack/oauth2/server/token/extension.rb lib/rack/oauth2/server/token/extension/example.rb lib/rack/oauth2/server/token/jwt_bearer.rb lib/rack/oauth2/server/token/password.rb lib/rack/oauth2/server/token/refresh_token.rb lib/rack/oauth2/server/token/saml2_bearer.rb lib/rack/oauth2/urn.rb lib/rack/oauth2/util.rb find lib/ -type d -empty -delete cd - cd - /usr/bin/ruby2.7 /usr/bin/gem2deb-test-runner ┌──────────────────────────────────────────────────────────────────────────────┐ │ Checking Rubygems dependency resolution on ruby2.7 │ └──────────────────────────────────────────────────────────────────────────────┘ GEM_PATH=/build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all:/build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0 ruby2.7 -e gem\ \"rack-oauth2\" ┌──────────────────────────────────────────────────────────────────────────────┐ │ Run tests for ruby2.7 from debian/ruby-tests.rake │ └──────────────────────────────────────────────────────────────────────────────┘ RUBYLIB=. GEM_PATH=/build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all:/build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0 ruby2.7 -S rake -f debian/ruby-tests.rake /usr/bin/ruby2.7 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation Rack::OAuth2::AccessToken::Authenticator when Legacy token is given behaves like authenticator should let the token authenticate the request when Bearer token is given behaves like authenticator should let the token authenticate the request when MAC token is given behaves like authenticator should let the token authenticate the request Rack::OAuth2::AccessToken::Bearer .authenticate should set Authorization header Rack::OAuth2::AccessToken::Legacy #to_s to_s is expected to == "access_token" .authenticate should set Authorization header Rack::OAuth2::AccessToken::MAC::Sha256HexVerifier when example from webtopay wallet API calculate is expected to == "21fb73c40b589622d0c78e9cd8900f89d9472aa724d0e5c3eca9ac1cd9d2a6d5" when raw_body is empty calculate is expected to be nil Rack::OAuth2::AccessToken::MAC::Signature when ext is not given calculate is expected to == "OZE9fTk2qiRtL1jb01L8lRxC66PTiAGhMDEmboeVeLs=" when ext is not given calculate is expected to == "6T3zZzy2Emppni6bzL7kdRxUWL4=" otherwise calculate is expected to == "+txL5oOFHGYjrfdNYH5VEzROaBY=" Rack::OAuth2::AccessToken::MAC::Verifier when "hmac-sha-1" is specified hash_generator is expected to be an instance of OpenSSL::Digest::SHA1 when "hmac-sha-256" is specified hash_generator is expected to be an instance of OpenSSL::Digest::SHA256 otherwise is expected to raise StandardError with "Unsupported Algorithm" Rack::OAuth2::AccessToken::MAC mac_key is expected to == "secret" mac_algorithm is expected to == "hmac-sha-256" token_response is expected to == {:access_token=>"access_token", :expires_in=>nil, :mac_algorithm=>"hmac-sha-256", :mac_key=>"secret", :refresh_token=>nil, :scope=>"", :token_type=>:mac} generate_nonce is expected to be a kind of String verify! when no ext_verifier is given when signature is valid is expected to == :verified otherwise is expected to raise Rack::OAuth2::Server::Resource::MAC::Unauthorized with "invalid_token :: Signature Invalid" when ext_verifier is given when ext is invalid is expected to raise Rack::OAuth2::Server::Resource::MAC::Unauthorized with "invalid_token :: Sha256HexVerifier Invalid" when ext is valid when signature is valid is expected to == :verified otherwise is expected to raise Rack::OAuth2::Server::Resource::MAC::Unauthorized with "invalid_token :: Signature Invalid" .authenticate when no ext_verifier is given should set Authorization header when ext_verifier is given should set Authorization header with ext_verifier Rack::OAuth2::AccessToken access_token is expected to == "access_token" refresh_token is expected to == "refresh_token" expires_in is expected to == 3600 scope is expected to == [:scope1, :scope2] token_response is expected to == {:access_token=>"access_token", :expires_in=>3600, :refresh_token=>"refresh_token", :scope=>"scope1 scope2", :token_type=>:bearer} when access_token is missing is expected to raise AttrRequired::AttrMissing otherwise is expected not to raise Exception get should delegate to HTTPClient with Authenticator filter in debug mode is expected to be a kind of Rack::OAuth2::Debugger::RequestFilter when extension params given raw_attributes is expected to include :ex_key delete should delegate to HTTPClient with Authenticator filter in debug mode is expected to be a kind of Rack::OAuth2::Debugger::RequestFilter when extension params given raw_attributes is expected to include :ex_key post should delegate to HTTPClient with Authenticator filter in debug mode is expected to be a kind of Rack::OAuth2::Debugger::RequestFilter when extension params given raw_attributes is expected to include :ex_key put should delegate to HTTPClient with Authenticator filter in debug mode is expected to be a kind of Rack::OAuth2::Debugger::RequestFilter when extension params given raw_attributes is expected to include :ex_key Rack::OAuth2::Client::Error status is expected to == 400 message is expected to == "invalid_request :: Include invalid parameters" response is expected to == {:error=>:invalid_request, :error_description=>"Include invalid parameters", :error_uri=>"http://server.example.com/error/invalid_request"} Rack::OAuth2::Client::Grant::AuthorizationCode when code is given when redirect_uri is given redirect_uri is expected to == "https://client.example.com/callback" as_json is expected to == {:code=>"code", :grant_type=>:authorization_code, :redirect_uri=>"https://client.example.com/callback"} otherwise redirect_uri is expected to be nil as_json is expected to == {:code=>"code", :grant_type=>:authorization_code, :redirect_uri=>nil} otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client::Grant::ClientCredentials as_json is expected to == {:grant_type=>:client_credentials} Rack::OAuth2::Client::Grant::JWTBearer when JWT assertion is given as_json is expected to == {:assertion=>"header.payload.signature", :grant_type=>"urn:ietf:params:oauth:grant-type:jwt-bearer"} otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client::Grant::Password when username is given when password is given as_json is expected to == {:grant_type=>:password, :password=>"password", :username=>"username"} otherwise is expected to raise AttrRequired::AttrMissing otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client::Grant::RefreshToken when refresh_token is given as_json is expected to == {:grant_type=>:refresh_token, :refresh_token=>"refresh_token"} otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client::Grant::SAML2Bearer when JWT assertion is given as_json is expected to == {:assertion=>"...", :grant_type=>"urn:ietf:params:oauth:grant-type:saml2-bearer"} otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client identifier is expected to == "client_id" secret is expected to == "client_secret" authorization_endpoint is expected to == "/oauth2/authorize" token_endpoint is expected to == "/oauth2/token" when identifier is missing is expected to raise AttrRequired::AttrMissing #authorization_uri is expected to include "https://server.example.com/oauth2/authorize" is expected to include "client_id=client_id" is expected to include "redirect_uri=https%3A%2F%2Fclient.example.com%2Fcallback" is expected to include "response_type=code" when endpoints are absolute URIs is expected to include "https://server2.example.com/oauth/authorize" when scheme is specified is expected to include "http://server.example.com/oauth2/authorize" when response_type is token is expected to include "response_type=token" when response_type is an Array is expected to include "response_type=token%20code" when scope is given is expected to include "scope=scope1%20scope2" #authorization_code= is expected to be an instance of Rack::OAuth2::Client::Grant::AuthorizationCode #resource_owner_credentials= is expected to be an instance of Rack::OAuth2::Client::Grant::Password #refresh_token= is expected to be an instance of Rack::OAuth2::Client::Grant::RefreshToken #access_token! *args handling client authentication method should be Basic auth as default when Basic auth method is used when client_id is a url should be encoded in "application/x-www-form-urlencoded" when basic_without_www_form_urlencode method is used when client_id is a url should be encoded in "application/x-www-form-urlencoded" when jwt_bearer auth method specified when client_secret is given should be JWT bearer client assertion w/ auto-generated HS256-signed JWT assertion when private_key is given when RSA key should be JWT bearer client assertion w/ auto-generated RS256-signed JWT assertion when EC key should be JWT bearer client assertion w/ auto-generated ES256-signed JWT assertion when client_assertion is explicitly given should be JWT bearer client assertion w/ specified assertion when other auth method specified should be body params when auth method is specified as Hash should be removed before sending request scopes when scope option given should specify given scope unknown params should be included in body params when bearer token is given is expected to be an instance of Rack::OAuth2::AccessToken::Bearer token_type is expected to == :bearer access_token is expected to == "access_token" refresh_token is expected to == "refresh_token" expires_in is expected to == 3600 when token type is "Bearer", not "bearer" is expected to be an instance of Rack::OAuth2::AccessToken::Bearer token_type is expected to == :bearer when mac token is given is expected to be an instance of Rack::OAuth2::AccessToken::MAC token_type is expected to == :mac access_token is expected to == "access_token" refresh_token is expected to == "refresh_token" expires_in is expected to == 3600 when no-type token is given (JSON) is expected to be an instance of Rack::OAuth2::AccessToken::Legacy token_type is expected to == :legacy access_token is expected to == "access_token" refresh_token is expected to == "refresh_token" expires_in is expected to == 3600 when token_type is forced is expected to be an instance of Rack::OAuth2::AccessToken::Bearer token_type is expected to == :bearer when no-type token is given (key-value) is expected to be an instance of Rack::OAuth2::AccessToken::Legacy token_type is expected to == :legacy access_token is expected to == "access_token" expires_in is expected to == 3600 when expires_in is not given expires_in is expected to be nil when unknown-type token is given is expected to raise StandardError with "Unknown Token Type" when error response is given is expected to raise Rack::OAuth2::Client::Error when no body given when error given is expected to raise Rack::OAuth2::Client::Error when no host info #authorization_uri is expected to raise Exception with "No Host Info" #access_token! is expected to raise Exception with "No Host Info" Rack::OAuth2::Debugger::RequestFilter #filter_request should log request #filter_response should log response Rack::OAuth2 logger is expected to be a kind of Logger debugging? is expected to == false .debug! debugging? is expected to == true .debug should enable debugging within given block should not force disable debugging .http_config when request_filter added when "debug!" is called should put Debugger::RequestFilter at last should reset_http_config .http_client when local_http_config is used should correctly set request_filter Rack::OAuth2::Server::Abstract::Error when full attributes are given status is expected to == 400 error is expected to == :invalid_request description is expected to == "Missing some required params" uri is expected to == "http://server.example.com/error" protocol_params is expected to == {:error=>:invalid_request, :error_description=>"Missing some required params", :error_uri=>"http://server.example.com/error"} when optional attributes are not given status is expected to == 400 error is expected to == :invalid_request description is expected to be nil uri is expected to be nil protocol_params is expected to == {:error=>:invalid_request, :error_description=>nil, :error_uri=>nil} Rack::OAuth2::Server::Abstract::BadRequest status is expected to == 400 Rack::OAuth2::Server::Abstract::Unauthorized status is expected to == 401 Rack::OAuth2::Server::Abstract::Forbidden status is expected to == 403 Rack::OAuth2::Server::Abstract::ServerError status is expected to == 500 Rack::OAuth2::Server::Abstract::TemporarilyUnavailable status is expected to == 503 Rack::OAuth2::Server::Authorize::Code when approved status is expected to == 302 location is expected to == "http://client.example.com/callback?code=authorization_code&state=state" when redirect_uri already includes query location is expected to == "http://client.example.com/callback?k=v&code=authorization_code&state=state" when redirect_uri is missing is expected to raise AttrRequired::AttrMissing when code is missing is expected to raise AttrRequired::AttrMissing when denied should redirect with error in query Rack::OAuth2::Server::Authorize::BadRequest is expected to be a kind of Rack::OAuth2::Server::Abstract::BadRequest protocol_params is expected to == {:error=>:invalid_request, :error_description=>nil, :error_uri=>nil, :state=>nil} #finish when redirect_uri is given when protocol_params_location = :query should redirect with error in query when protocol_params_location = :fragment should redirect with error in fragment otherwise should redirect without error otherwise should raise itself Rack::OAuth2::Server::Authorize::ErrorMethods bad_request! is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when response_type = :code should set protocol_params_location = :query when response_type = :token should set protocol_params_location = :fragment invalid_request! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :invalid_request unauthorized_client! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :unauthorized_client access_denied! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :access_denied unsupported_response_type! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :unsupported_response_type invalid_scope! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :invalid_scope server_error! should raise Rack::OAuth2::Server::Authorize::ServerError with error = :server_error temporarily_unavailable! should raise Rack::OAuth2::Server::Authorize::TemporarilyUnavailable with error = :temporarily_unavailable Rack::OAuth2::Server::Authorize::Extension::CodeAndToken when approved status is expected to == 302 location is expected to include "http://client.example.com/callback#" location is expected to include "code=authorization_code" location is expected to include "access_token=access_token" location is expected to include "token_type=bearer" when refresh_token is given location is expected to include "http://client.example.com/callback#" location is expected to include "code=authorization_code" location is expected to include "access_token=access_token" location is expected to include "token_type=bearer" when denied should redirect with error in fragment Rack::OAuth2::Server::Authorize::Token when approved status is expected to == 302 location is expected to == "http://client.example.com/callback#access_token=access_token&state=state&token_type=bearer" when refresh_token is given location is expected to == "http://client.example.com/callback#access_token=access_token&state=state&token_type=bearer" when redirect_uri is missing is expected to raise AttrRequired::AttrMissing when access_token is missing is expected to raise AttrRequired::AttrMissing when denied should redirect with error in fragment Rack::OAuth2::Server::Authorize when response_type is missing is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when redirect_uri is missing is expected not to raise Exception when client_id is missing is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when unknown response_type is given is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when all required parameters are valid when response_type = :code status is expected to == 200 when response_type = :token status is expected to == 200 Rack::OAuth2::Server::Authorize::Request #varified_redirect_uri when an Array of pre-registered URIs are given when given redirect_uri is valid against one of them should be valid otherwise is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when exact mathed redirect_uri is given should be valid when partially mathed redirect_uri is given when partial matching allowed should be valid otherwise is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when invalid redirect_uri is given is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when redirect_uri is missing when pre-registered redirect_uri is a String should use pre-registered redirect_uri when pre-registered redirect_uri is an Array when only 1 when partial match allowed is expected to raise Rack::OAuth2::Server::Authorize::BadRequest otherwise should use pre-registered redirect_uri when more than 2 is expected to raise Rack::OAuth2::Server::Authorize::BadRequest extensibility extensions is expected to == [Rack::OAuth2::Server::Authorize::Extension::CodeAndToken] code token is expected to == Rack::OAuth2::Server::Authorize::Extension::CodeAndToken token code is expected to == Rack::OAuth2::Server::Authorize::Extension::CodeAndToken token code id_token is expected to raise Rack::OAuth2::Server::Authorize::BadRequest id_token is expected to == Rack::OAuth2::Server::Authorize::Extension::IdToken extensions is expected to == [Rack::OAuth2::Server::Authorize::Extension::CodeAndToken, Rack::OAuth2::Server::Authorize::Extension::IdToken] Rack::OAuth2::Server::Authorize::Code authorization request when code_challenge is given when code_challenge_method is given code_challenge is expected to == "bNazYBCun4y98SLpuO5yobUvShtp8-Tdxorlq__l728" code_challenge_method is expected to == "S256" when code_challenge_method is omitted code_challenge is expected to == "7kzL8Q31f994JJcBtOIn0KrfdgCRgmYrnitKGiaDBfY" code_challenge_method is expected to == nil otherwise code_challenge is expected to == nil code_challenge_method is expected to == nil token request when code_verifier is given code_verifier is expected to == "94486c1495476cf2965549c4c51fb311" #verify_code_verifier! when code_verifier is given with code_challenge_method=plain is expected not to raise Exception when collect code_challenge is given is expected not to raise Exception when wrong code_challenge is blank is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when code_challenge is nil is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when unknown code_challenge_method is given is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ otherwise code_verifier is expected to == nil #verify_code_verifier! when code_verifier is given with code_challenge_method=plain is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when collect code_challenge is given is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when wrong code_challenge is blank is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when code_challenge is nil is expected not to raise Exception when unknown code_challenge_method is given is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ Rack::OAuth2::Server::Authorize::Code authorization request when response_mode is given response_mode is expected to == "form_post" otherwise response_mode is expected to == nil Rack::OAuth2::Server::Resource::Bearer::Unauthorized is expected to be a kind of Rack::OAuth2::Server::Resource::Unauthorized #scheme scheme is expected to == :Bearer #finish should use Bearer scheme Rack::OAuth2::Server::Resource::Bearer::ErrorMethods unauthorized! is expected to raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized invalid_token! should raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized with error = :invalid_token Rack::OAuth2::Server::Resource::Bearer when no access token is given behaves like skipped_authentication_request should skip OAuth 2.0 authentication when valid_token is given when token is in Authorization header behaves like authenticated_bearer_request should be authenticated when token is in params behaves like authenticated_bearer_request should be authenticated when invalid authorization header is given behaves like skipped_authentication_request should skip OAuth 2.0 authentication when invalid_token is given when token is in Authorization header behaves like unauthorized_bearer_request should be unauthorized when token is in params behaves like unauthorized_bearer_request should be unauthorized realm when specified should use specified realm otherwize should use default realm when multiple access_token is given when token is in Authorization header and params behaves like bad_bearer_request should be bad_request Rack::OAuth2::Server::Resource::BadRequest is expected to be a kind of Rack::OAuth2::Server::Abstract::BadRequest #finish should respond in JSON Rack::OAuth2::Server::Resource::Unauthorized is expected to be a kind of Rack::OAuth2::Server::Abstract::Unauthorized #scheme is expected to raise RuntimeError with "Define me!" when scheme is defined #finish should respond in JSON when error_code is not invalid_token should have error_code in body but not in WWW-Authenticate header when no error_code is given should have error_code in body but not in WWW-Authenticate header when realm is specified should use given realm Rack::OAuth2::Server::Resource::Forbidden is expected to be a kind of Rack::OAuth2::Server::Abstract::Forbidden #finish should respond in JSON when scope option is given should have blank WWW-Authenticate header Rack::OAuth2::Server::Resource::Bearer::ErrorMethods bad_request! is expected to raise Rack::OAuth2::Server::Resource::BadRequest unauthorized! is expected to raise RuntimeError with "Define me!" invalid_request! should raise Rack::OAuth2::Server::Resource::BadRequest with error = :invalid_request invalid_token! is expected to raise RuntimeError with "Define me!" insufficient_scope! should raise Rack::OAuth2::Server::Resource::Forbidden with error = :insufficient_scope Rack::OAuth2::Server::Resource::MAC::Unauthorized is expected to be a kind of Rack::OAuth2::Server::Resource::Unauthorized #scheme scheme is expected to == :MAC #finish should use MAC scheme Rack::OAuth2::Server::Resource::MAC::ErrorMethods unauthorized! is expected to raise Rack::OAuth2::Server::Resource::MAC::Unauthorized invalid_token! should raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized with error = :invalid_token Rack::OAuth2::Server::Resource::MAC when no access token is given should skip OAuth 2.0 authentication when valid_token is given when other required params are missing behaves like unauthorized_mac_request should be unauthorized when other required params are invalid behaves like unauthorized_mac_request should be unauthorized when all required params are valid behaves like authenticated_mac_request should be authenticated when all required params are valid and ts is expired behaves like unauthorized_mac_request should be unauthorized when invalid_token is given behaves like unauthorized_mac_request should be unauthorized realm when specified should use specified realm otherwize should use default realm Rack::OAuth2::Server::Resource realm is expected to == "realm" Rack::OAuth2::Server::Resource::Request #setup! is expected to raise RuntimeError with "Define me!" #oauth2? is expected to raise RuntimeError with "Define me!" Rack::OAuth2::Server::Token::AuthorizationCode should prevent to be cached status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when code is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token::ClientCredentials status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" basic auth status is expected to == 200 compliance with RFC6749 sec 2.3.1 status is expected to == 200 Rack::OAuth2::Server::Token::BadRequest is expected to be a kind of Rack::OAuth2::Server::Abstract::BadRequest #finish should respond in JSON Rack::OAuth2::Server::Token::Unauthorized is expected to be a kind of Rack::OAuth2::Server::Abstract::Unauthorized #finish should respond in JSON Rack::OAuth2::Server::Token::ErrorMethods bad_request! is expected to raise Rack::OAuth2::Server::Token::BadRequest unauthorized! is expected to raise Rack::OAuth2::Server::Token::Unauthorized invalid_request! should raise Rack::OAuth2::Server::Token::BadRequest with error = :invalid_request invalid_client! should raise Rack::OAuth2::Server::Token::Unauthorized with error = :invalid_client invalid_grant! should raise Rack::OAuth2::Server::Token::BadRequest with error = :invalid_grant unauthorized_client! should raise Rack::OAuth2::Server::Token::BadRequest with error = :unauthorized_client unsupported_grant_type! should raise Rack::OAuth2::Server::Token::BadRequest with error = :unsupported_grant_type invalid_scope! should raise Rack::OAuth2::Server::Token::BadRequest with error = :invalid_scope Rack::OAuth2::Server::Token::JWTBearer status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when assertion is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token::Password status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when username is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when password is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token::RefreshToken status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when refresh_token is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token::SAML2Bearer status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when assertion is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token when multiple client credentials are given when different credentials are given should fail with unsupported_grant_type when same credentials are given should ignore duplicates when unsupported grant_type is given status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"unsupported_grant_type\"" when client_id is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when grant_type is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when client_id is given via JWT client assertion when client_assertion is invalid JWT status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when client_assertion_type is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when client_assertion_type is unknown status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when client_assertion issuer is different from client_id status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" otherwise status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" when invalid_request status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" body is expected to include "\"error_description\":\"The request is missing a required parameter, includes an unsupported paramet...tials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed.\"" when invalid_client status is expected to == 401 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_client\"" body is expected to include "\"error_description\":\"The client identifier provided is invalid, the client failed to authenticate...lude its credentials, provided multiple client credentials, or used unsupported credentials type.\"" headers is expected to include "WWW-Authenticate" when invalid_grant status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_grant\"" body is expected to include "\"error_description\":\"The provided access grant is invalid, expired, or revoked (e.g. invalid asse...token, bad end-user password credentials, or mismatching authorization code and redirection URI).\"" when unauthorized_client status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"unauthorized_client\"" body is expected to include "\"error_description\":\"The authenticated client is not authorized to use the access grant type provided.\"" when unsupported_grant_type status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"unsupported_grant_type\"" body is expected to include "\"error_description\":\"The access grant included - its type or another attribute - is not supported by the authorization server.\"" when invalid_scope status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_scope\"" body is expected to include "\"error_description\":\"The requested scope is invalid, unknown, malformed, or exceeds the previously granted scope.\"" when skip_www_authenticate option is specified on invalid_client headers is expected not to include "WWW-Authenticate" when responding when access_token is missing is expected to raise AttrRequired::AttrMissing extensibility extensions is expected to == [Rack::OAuth2::Server::Token::Extension::Example] JWT assertion is expected to == Rack::OAuth2::Server::Token::Extension::Example Rack::OAuth2::Util .www_form_url_encode is expected to == "%3D%2B+.-%2F" .www_form_urldecode is expected to == "=+ .-/" .base64_encode is expected to == "PSsgLi0v" .compact_hash is expected to == {:k1=>"v1"} .parse_uri when String is given is expected to be a kind of URI::Generic when URI is given should be itself when invalid URI is given is expected to raise URI::InvalidURIError otherwise is expected to raise StandardError .redirect_uri when location = :fragment is expected to == "http://client.example.com#k1=v1" when location = :query is expected to == "http://client.example.com?k1=v1" .uri_match? when invalid URI is given is expected to == false when exactly same is expected to == true when path prefix matches is expected to == true otherwise is expected to == false Finished in 0.56317 seconds (files took 1.19 seconds to load) 396 examples, 0 failures /usr/bin/ruby3.0 /usr/bin/gem2deb-test-runner ┌──────────────────────────────────────────────────────────────────────────────┐ │ Checking Rubygems dependency resolution on ruby3.0 │ └──────────────────────────────────────────────────────────────────────────────┘ GEM_PATH=/build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all:/build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.0.0:/var/lib/gems/3.0.0:/usr/local/lib/ruby/gems/3.0.0:/usr/lib/ruby/gems/3.0.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.0.0:/usr/share/rubygems-integration/3.0.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.0.0 ruby3.0 -e gem\ \"rack-oauth2\" ┌──────────────────────────────────────────────────────────────────────────────┐ │ Run tests for ruby3.0 from debian/ruby-tests.rake │ └──────────────────────────────────────────────────────────────────────────────┘ RUBYLIB=. GEM_PATH=/build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/ruby-rack-oauth2/usr/share/rubygems-integration/all:/build/ruby-rack-oauth2-3c8zeb/ruby-rack-oauth2-1.19.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.0.0:/var/lib/gems/3.0.0:/usr/local/lib/ruby/gems/3.0.0:/usr/lib/ruby/gems/3.0.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.0.0:/usr/share/rubygems-integration/3.0.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.0.0 ruby3.0 -S rake -f debian/ruby-tests.rake /usr/bin/ruby3.0 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation Rack::OAuth2::AccessToken::Authenticator when Legacy token is given behaves like authenticator should let the token authenticate the request when Bearer token is given behaves like authenticator should let the token authenticate the request when MAC token is given behaves like authenticator should let the token authenticate the request Rack::OAuth2::AccessToken::Bearer .authenticate should set Authorization header Rack::OAuth2::AccessToken::Legacy #to_s to_s is expected to == "access_token" .authenticate should set Authorization header Rack::OAuth2::AccessToken::MAC::Sha256HexVerifier when example from webtopay wallet API calculate is expected to == "21fb73c40b589622d0c78e9cd8900f89d9472aa724d0e5c3eca9ac1cd9d2a6d5" when raw_body is empty calculate is expected to be nil Rack::OAuth2::AccessToken::MAC::Signature when ext is not given calculate is expected to == "OZE9fTk2qiRtL1jb01L8lRxC66PTiAGhMDEmboeVeLs=" when ext is not given calculate is expected to == "6T3zZzy2Emppni6bzL7kdRxUWL4=" otherwise calculate is expected to == "+txL5oOFHGYjrfdNYH5VEzROaBY=" Rack::OAuth2::AccessToken::MAC::Verifier when "hmac-sha-1" is specified hash_generator is expected to be an instance of OpenSSL::Digest::SHA1 when "hmac-sha-256" is specified hash_generator is expected to be an instance of OpenSSL::Digest::SHA256 otherwise is expected to raise StandardError with "Unsupported Algorithm" Rack::OAuth2::AccessToken::MAC mac_key is expected to == "secret" mac_algorithm is expected to == "hmac-sha-256" token_response is expected to == {:access_token=>"access_token", :expires_in=>nil, :mac_algorithm=>"hmac-sha-256", :mac_key=>"secret", :refresh_token=>nil, :scope=>"", :token_type=>:mac} generate_nonce is expected to be a kind of String verify! when no ext_verifier is given when signature is valid is expected to == :verified otherwise is expected to raise Rack::OAuth2::Server::Resource::MAC::Unauthorized with "invalid_token :: Signature Invalid" when ext_verifier is given when ext is invalid is expected to raise Rack::OAuth2::Server::Resource::MAC::Unauthorized with "invalid_token :: Sha256HexVerifier Invalid" when ext is valid when signature is valid is expected to == :verified otherwise is expected to raise Rack::OAuth2::Server::Resource::MAC::Unauthorized with "invalid_token :: Signature Invalid" .authenticate when no ext_verifier is given should set Authorization header when ext_verifier is given should set Authorization header with ext_verifier Rack::OAuth2::AccessToken access_token is expected to == "access_token" refresh_token is expected to == "refresh_token" expires_in is expected to == 3600 scope is expected to == [:scope1, :scope2] token_response is expected to == {:access_token=>"access_token", :expires_in=>3600, :refresh_token=>"refresh_token", :scope=>"scope1 scope2", :token_type=>:bearer} when access_token is missing is expected to raise AttrRequired::AttrMissing otherwise is expected not to raise Exception get should delegate to HTTPClient with Authenticator filter in debug mode is expected to be a kind of Rack::OAuth2::Debugger::RequestFilter when extension params given raw_attributes is expected to include :ex_key delete should delegate to HTTPClient with Authenticator filter in debug mode is expected to be a kind of Rack::OAuth2::Debugger::RequestFilter when extension params given raw_attributes is expected to include :ex_key post should delegate to HTTPClient with Authenticator filter in debug mode is expected to be a kind of Rack::OAuth2::Debugger::RequestFilter when extension params given raw_attributes is expected to include :ex_key put should delegate to HTTPClient with Authenticator filter in debug mode is expected to be a kind of Rack::OAuth2::Debugger::RequestFilter when extension params given raw_attributes is expected to include :ex_key Rack::OAuth2::Client::Error status is expected to == 400 message is expected to == "invalid_request :: Include invalid parameters" response is expected to == {:error=>:invalid_request, :error_description=>"Include invalid parameters", :error_uri=>"http://server.example.com/error/invalid_request"} Rack::OAuth2::Client::Grant::AuthorizationCode when code is given when redirect_uri is given redirect_uri is expected to == "https://client.example.com/callback" as_json is expected to == {:code=>"code", :grant_type=>:authorization_code, :redirect_uri=>"https://client.example.com/callback"} otherwise redirect_uri is expected to be nil as_json is expected to == {:code=>"code", :grant_type=>:authorization_code, :redirect_uri=>nil} otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client::Grant::ClientCredentials as_json is expected to == {:grant_type=>:client_credentials} Rack::OAuth2::Client::Grant::JWTBearer when JWT assertion is given as_json is expected to == {:assertion=>"header.payload.signature", :grant_type=>"urn:ietf:params:oauth:grant-type:jwt-bearer"} otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client::Grant::Password when username is given when password is given as_json is expected to == {:grant_type=>:password, :password=>"password", :username=>"username"} otherwise is expected to raise AttrRequired::AttrMissing otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client::Grant::RefreshToken when refresh_token is given as_json is expected to == {:grant_type=>:refresh_token, :refresh_token=>"refresh_token"} otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client::Grant::SAML2Bearer when JWT assertion is given as_json is expected to == {:assertion=>"...", :grant_type=>"urn:ietf:params:oauth:grant-type:saml2-bearer"} otherwise is expected to raise AttrRequired::AttrMissing Rack::OAuth2::Client identifier is expected to == "client_id" secret is expected to == "client_secret" authorization_endpoint is expected to == "/oauth2/authorize" token_endpoint is expected to == "/oauth2/token" when identifier is missing is expected to raise AttrRequired::AttrMissing #authorization_uri is expected to include "https://server.example.com/oauth2/authorize" is expected to include "client_id=client_id" is expected to include "redirect_uri=https%3A%2F%2Fclient.example.com%2Fcallback" is expected to include "response_type=code" when endpoints are absolute URIs is expected to include "https://server2.example.com/oauth/authorize" when scheme is specified is expected to include "http://server.example.com/oauth2/authorize" when response_type is token is expected to include "response_type=token" when response_type is an Array is expected to include "response_type=token%20code" when scope is given is expected to include "scope=scope1%20scope2" #authorization_code= is expected to be an instance of Rack::OAuth2::Client::Grant::AuthorizationCode #resource_owner_credentials= is expected to be an instance of Rack::OAuth2::Client::Grant::Password #refresh_token= is expected to be an instance of Rack::OAuth2::Client::Grant::RefreshToken #access_token! *args handling client authentication method should be Basic auth as default when Basic auth method is used when client_id is a url should be encoded in "application/x-www-form-urlencoded" when basic_without_www_form_urlencode method is used when client_id is a url should be encoded in "application/x-www-form-urlencoded" when jwt_bearer auth method specified when client_secret is given should be JWT bearer client assertion w/ auto-generated HS256-signed JWT assertion when private_key is given when RSA key should be JWT bearer client assertion w/ auto-generated RS256-signed JWT assertion when EC key should be JWT bearer client assertion w/ auto-generated ES256-signed JWT assertion when client_assertion is explicitly given should be JWT bearer client assertion w/ specified assertion when other auth method specified should be body params when auth method is specified as Hash should be removed before sending request scopes when scope option given should specify given scope unknown params should be included in body params when bearer token is given is expected to be an instance of Rack::OAuth2::AccessToken::Bearer token_type is expected to == :bearer access_token is expected to == "access_token" refresh_token is expected to == "refresh_token" expires_in is expected to == 3600 when token type is "Bearer", not "bearer" is expected to be an instance of Rack::OAuth2::AccessToken::Bearer token_type is expected to == :bearer when mac token is given is expected to be an instance of Rack::OAuth2::AccessToken::MAC token_type is expected to == :mac access_token is expected to == "access_token" refresh_token is expected to == "refresh_token" expires_in is expected to == 3600 when no-type token is given (JSON) is expected to be an instance of Rack::OAuth2::AccessToken::Legacy token_type is expected to == :legacy access_token is expected to == "access_token" refresh_token is expected to == "refresh_token" expires_in is expected to == 3600 when token_type is forced is expected to be an instance of Rack::OAuth2::AccessToken::Bearer token_type is expected to == :bearer when no-type token is given (key-value) is expected to be an instance of Rack::OAuth2::AccessToken::Legacy token_type is expected to == :legacy access_token is expected to == "access_token" expires_in is expected to == 3600 when expires_in is not given expires_in is expected to be nil when unknown-type token is given is expected to raise StandardError with "Unknown Token Type" when error response is given is expected to raise Rack::OAuth2::Client::Error when no body given when error given is expected to raise Rack::OAuth2::Client::Error when no host info #authorization_uri is expected to raise Exception with "No Host Info" #access_token! is expected to raise Exception with "No Host Info" Rack::OAuth2::Debugger::RequestFilter #filter_request should log request #filter_response should log response Rack::OAuth2 logger is expected to be a kind of Logger debugging? is expected to == false .debug! debugging? is expected to == true .debug should enable debugging within given block should not force disable debugging .http_config when request_filter added when "debug!" is called should put Debugger::RequestFilter at last should reset_http_config .http_client when local_http_config is used should correctly set request_filter Rack::OAuth2::Server::Abstract::Error when full attributes are given status is expected to == 400 error is expected to == :invalid_request description is expected to == "Missing some required params" uri is expected to == "http://server.example.com/error" protocol_params is expected to == {:error=>:invalid_request, :error_description=>"Missing some required params", :error_uri=>"http://server.example.com/error"} when optional attributes are not given status is expected to == 400 error is expected to == :invalid_request description is expected to be nil uri is expected to be nil protocol_params is expected to == {:error=>:invalid_request, :error_description=>nil, :error_uri=>nil} Rack::OAuth2::Server::Abstract::BadRequest status is expected to == 400 Rack::OAuth2::Server::Abstract::Unauthorized status is expected to == 401 Rack::OAuth2::Server::Abstract::Forbidden status is expected to == 403 Rack::OAuth2::Server::Abstract::ServerError status is expected to == 500 Rack::OAuth2::Server::Abstract::TemporarilyUnavailable status is expected to == 503 Rack::OAuth2::Server::Authorize::Code when approved status is expected to == 302 location is expected to == "http://client.example.com/callback?code=authorization_code&state=state" when redirect_uri already includes query location is expected to == "http://client.example.com/callback?k=v&code=authorization_code&state=state" when redirect_uri is missing is expected to raise AttrRequired::AttrMissing when code is missing is expected to raise AttrRequired::AttrMissing when denied should redirect with error in query Rack::OAuth2::Server::Authorize::BadRequest is expected to be a kind of Rack::OAuth2::Server::Abstract::BadRequest protocol_params is expected to == {:error=>:invalid_request, :error_description=>nil, :error_uri=>nil, :state=>nil} #finish when redirect_uri is given when protocol_params_location = :query should redirect with error in query when protocol_params_location = :fragment should redirect with error in fragment otherwise should redirect without error otherwise should raise itself Rack::OAuth2::Server::Authorize::ErrorMethods bad_request! is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when response_type = :code should set protocol_params_location = :query when response_type = :token should set protocol_params_location = :fragment invalid_request! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :invalid_request unauthorized_client! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :unauthorized_client access_denied! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :access_denied unsupported_response_type! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :unsupported_response_type invalid_scope! should raise Rack::OAuth2::Server::Authorize::BadRequest with error = :invalid_scope server_error! should raise Rack::OAuth2::Server::Authorize::ServerError with error = :server_error temporarily_unavailable! should raise Rack::OAuth2::Server::Authorize::TemporarilyUnavailable with error = :temporarily_unavailable Rack::OAuth2::Server::Authorize::Extension::CodeAndToken when approved status is expected to == 302 location is expected to include "http://client.example.com/callback#" location is expected to include "code=authorization_code" location is expected to include "access_token=access_token" location is expected to include "token_type=bearer" when refresh_token is given location is expected to include "http://client.example.com/callback#" location is expected to include "code=authorization_code" location is expected to include "access_token=access_token" location is expected to include "token_type=bearer" when denied should redirect with error in fragment Rack::OAuth2::Server::Authorize::Token when approved status is expected to == 302 location is expected to == "http://client.example.com/callback#access_token=access_token&state=state&token_type=bearer" when refresh_token is given location is expected to == "http://client.example.com/callback#access_token=access_token&state=state&token_type=bearer" when redirect_uri is missing is expected to raise AttrRequired::AttrMissing when access_token is missing is expected to raise AttrRequired::AttrMissing when denied should redirect with error in fragment Rack::OAuth2::Server::Authorize when response_type is missing is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when redirect_uri is missing is expected not to raise Exception when client_id is missing is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when unknown response_type is given is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when all required parameters are valid when response_type = :code status is expected to == 200 when response_type = :token status is expected to == 200 Rack::OAuth2::Server::Authorize::Request #varified_redirect_uri when an Array of pre-registered URIs are given when given redirect_uri is valid against one of them should be valid otherwise is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when exact mathed redirect_uri is given should be valid when partially mathed redirect_uri is given when partial matching allowed should be valid otherwise is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when invalid redirect_uri is given is expected to raise Rack::OAuth2::Server::Authorize::BadRequest when redirect_uri is missing when pre-registered redirect_uri is a String should use pre-registered redirect_uri when pre-registered redirect_uri is an Array when only 1 when partial match allowed is expected to raise Rack::OAuth2::Server::Authorize::BadRequest otherwise should use pre-registered redirect_uri when more than 2 is expected to raise Rack::OAuth2::Server::Authorize::BadRequest extensibility extensions is expected to == [Rack::OAuth2::Server::Authorize::Extension::CodeAndToken] code token is expected to == Rack::OAuth2::Server::Authorize::Extension::CodeAndToken token code is expected to == Rack::OAuth2::Server::Authorize::Extension::CodeAndToken token code id_token is expected to raise Rack::OAuth2::Server::Authorize::BadRequest id_token is expected to == Rack::OAuth2::Server::Authorize::Extension::IdToken extensions is expected to == [Rack::OAuth2::Server::Authorize::Extension::CodeAndToken, Rack::OAuth2::Server::Authorize::Extension::IdToken] Rack::OAuth2::Server::Authorize::Code authorization request when code_challenge is given when code_challenge_method is given code_challenge is expected to == "1anhnl3Cun-k9HgKpY98jSjv3x_rnCJyK2D4rm7z8aY" code_challenge_method is expected to == "S256" when code_challenge_method is omitted code_challenge is expected to == "YiDTEBSLbRi8CnZJlAjVz4DX4SDGycd5addSyf52_yo" code_challenge_method is expected to == nil otherwise code_challenge is expected to == nil code_challenge_method is expected to == nil token request when code_verifier is given code_verifier is expected to == "9125191f6b478cc465512e7ffbd5e4e7" #verify_code_verifier! when code_verifier is given with code_challenge_method=plain is expected not to raise Exception when collect code_challenge is given is expected not to raise Exception when wrong code_challenge is blank is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when code_challenge is nil is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when unknown code_challenge_method is given is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ otherwise code_verifier is expected to == nil #verify_code_verifier! when code_verifier is given with code_challenge_method=plain is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when collect code_challenge is given is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when wrong code_challenge is blank is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ when code_challenge is nil is expected not to raise Exception when unknown code_challenge_method is given is expected to raise Rack::OAuth2::Server::Token::BadRequest with message matching /invalid_grant/ Rack::OAuth2::Server::Authorize::Code authorization request when response_mode is given response_mode is expected to == "form_post" otherwise response_mode is expected to == nil Rack::OAuth2::Server::Resource::Bearer::Unauthorized is expected to be a kind of Rack::OAuth2::Server::Resource::Unauthorized #scheme scheme is expected to == :Bearer #finish should use Bearer scheme Rack::OAuth2::Server::Resource::Bearer::ErrorMethods unauthorized! is expected to raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized invalid_token! should raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized with error = :invalid_token Rack::OAuth2::Server::Resource::Bearer when no access token is given behaves like skipped_authentication_request should skip OAuth 2.0 authentication when valid_token is given when token is in Authorization header behaves like authenticated_bearer_request should be authenticated when token is in params behaves like authenticated_bearer_request should be authenticated when invalid authorization header is given behaves like skipped_authentication_request should skip OAuth 2.0 authentication when invalid_token is given when token is in Authorization header behaves like unauthorized_bearer_request should be unauthorized when token is in params behaves like unauthorized_bearer_request should be unauthorized realm when specified should use specified realm otherwize should use default realm when multiple access_token is given when token is in Authorization header and params behaves like bad_bearer_request should be bad_request Rack::OAuth2::Server::Resource::BadRequest is expected to be a kind of Rack::OAuth2::Server::Abstract::BadRequest #finish should respond in JSON Rack::OAuth2::Server::Resource::Unauthorized is expected to be a kind of Rack::OAuth2::Server::Abstract::Unauthorized #scheme is expected to raise RuntimeError with "Define me!" when scheme is defined #finish should respond in JSON when error_code is not invalid_token should have error_code in body but not in WWW-Authenticate header when no error_code is given should have error_code in body but not in WWW-Authenticate header when realm is specified should use given realm Rack::OAuth2::Server::Resource::Forbidden is expected to be a kind of Rack::OAuth2::Server::Abstract::Forbidden #finish should respond in JSON when scope option is given should have blank WWW-Authenticate header Rack::OAuth2::Server::Resource::Bearer::ErrorMethods bad_request! is expected to raise Rack::OAuth2::Server::Resource::BadRequest unauthorized! is expected to raise RuntimeError with "Define me!" invalid_request! should raise Rack::OAuth2::Server::Resource::BadRequest with error = :invalid_request invalid_token! is expected to raise RuntimeError with "Define me!" insufficient_scope! should raise Rack::OAuth2::Server::Resource::Forbidden with error = :insufficient_scope Rack::OAuth2::Server::Resource::MAC::Unauthorized is expected to be a kind of Rack::OAuth2::Server::Resource::Unauthorized #scheme scheme is expected to == :MAC #finish should use MAC scheme Rack::OAuth2::Server::Resource::MAC::ErrorMethods unauthorized! is expected to raise Rack::OAuth2::Server::Resource::MAC::Unauthorized invalid_token! should raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized with error = :invalid_token Rack::OAuth2::Server::Resource::MAC when no access token is given should skip OAuth 2.0 authentication when valid_token is given when other required params are missing behaves like unauthorized_mac_request should be unauthorized when other required params are invalid behaves like unauthorized_mac_request should be unauthorized when all required params are valid behaves like authenticated_mac_request should be authenticated when all required params are valid and ts is expired behaves like unauthorized_mac_request should be unauthorized when invalid_token is given behaves like unauthorized_mac_request should be unauthorized realm when specified should use specified realm otherwize should use default realm Rack::OAuth2::Server::Resource realm is expected to == "realm" Rack::OAuth2::Server::Resource::Request #setup! is expected to raise RuntimeError with "Define me!" #oauth2? is expected to raise RuntimeError with "Define me!" Rack::OAuth2::Server::Token::AuthorizationCode should prevent to be cached status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when code is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token::ClientCredentials status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" basic auth status is expected to == 200 compliance with RFC6749 sec 2.3.1 status is expected to == 200 Rack::OAuth2::Server::Token::BadRequest is expected to be a kind of Rack::OAuth2::Server::Abstract::BadRequest #finish should respond in JSON Rack::OAuth2::Server::Token::Unauthorized is expected to be a kind of Rack::OAuth2::Server::Abstract::Unauthorized #finish should respond in JSON Rack::OAuth2::Server::Token::ErrorMethods bad_request! is expected to raise Rack::OAuth2::Server::Token::BadRequest unauthorized! is expected to raise Rack::OAuth2::Server::Token::Unauthorized invalid_request! should raise Rack::OAuth2::Server::Token::BadRequest with error = :invalid_request invalid_client! should raise Rack::OAuth2::Server::Token::Unauthorized with error = :invalid_client invalid_grant! should raise Rack::OAuth2::Server::Token::BadRequest with error = :invalid_grant unauthorized_client! should raise Rack::OAuth2::Server::Token::BadRequest with error = :unauthorized_client unsupported_grant_type! should raise Rack::OAuth2::Server::Token::BadRequest with error = :unsupported_grant_type invalid_scope! should raise Rack::OAuth2::Server::Token::BadRequest with error = :invalid_scope Rack::OAuth2::Server::Token::JWTBearer status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when assertion is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token::Password status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when username is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when password is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token::RefreshToken status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when refresh_token is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token::SAML2Bearer status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" body is expected to include "\"token_type\":\"bearer\"" when assertion is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" Rack::OAuth2::Server::Token when multiple client credentials are given when different credentials are given should fail with unsupported_grant_type when same credentials are given should ignore duplicates when unsupported grant_type is given status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"unsupported_grant_type\"" when client_id is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when grant_type is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when client_id is given via JWT client assertion when client_assertion is invalid JWT status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when client_assertion_type is missing status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when client_assertion_type is unknown status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" when client_assertion issuer is different from client_id status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" otherwise status is expected to == 200 content_type is expected to == "application/json" body is expected to include "\"access_token\":\"access_token\"" when invalid_request status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_request\"" body is expected to include "\"error_description\":\"The request is missing a required parameter, includes an unsupported paramet...tials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed.\"" when invalid_client status is expected to == 401 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_client\"" body is expected to include "\"error_description\":\"The client identifier provided is invalid, the client failed to authenticate...lude its credentials, provided multiple client credentials, or used unsupported credentials type.\"" headers is expected to include "WWW-Authenticate" when invalid_grant status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_grant\"" body is expected to include "\"error_description\":\"The provided access grant is invalid, expired, or revoked (e.g. invalid asse...token, bad end-user password credentials, or mismatching authorization code and redirection URI).\"" when unauthorized_client status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"unauthorized_client\"" body is expected to include "\"error_description\":\"The authenticated client is not authorized to use the access grant type provided.\"" when unsupported_grant_type status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"unsupported_grant_type\"" body is expected to include "\"error_description\":\"The access grant included - its type or another attribute - is not supported by the authorization server.\"" when invalid_scope status is expected to == 400 content_type is expected to == "application/json" body is expected to include "\"error\":\"invalid_scope\"" body is expected to include "\"error_description\":\"The requested scope is invalid, unknown, malformed, or exceeds the previously granted scope.\"" when skip_www_authenticate option is specified on invalid_client headers is expected not to include "WWW-Authenticate" when responding when access_token is missing is expected to raise AttrRequired::AttrMissing extensibility extensions is expected to == [Rack::OAuth2::Server::Token::Extension::Example] JWT assertion is expected to == Rack::OAuth2::Server::Token::Extension::Example Rack::OAuth2::Util .www_form_url_encode is expected to == "%3D%2B+.-%2F" .www_form_urldecode is expected to == "=+ .-/" .base64_encode is expected to == "PSsgLi0v" .compact_hash is expected to == {:k1=>"v1"} .parse_uri when String is given is expected to be a kind of URI::Generic when URI is given should be itself when invalid URI is given is expected to raise URI::InvalidURIError otherwise is expected to raise StandardError .redirect_uri when location = :fragment is expected to == "http://client.example.com#k1=v1" when location = :query is expected to == "http://client.example.com?k1=v1" .uri_match? when invalid URI is given is expected to == false when exactly same is expected to == true when path prefix matches is expected to == true otherwise is expected to == false Finished in 0.66248 seconds (files took 1.76 seconds to load) 396 examples, 0 failures ┌──────────────────────────────────────────────────────────────────────────────┐ │ dh_ruby --install finished │ └──────────────────────────────────────────────────────────────────────────────┘ dh_installdocs -i -O--buildsystem=ruby dh_ruby_fixdocs -i -O--buildsystem=ruby dh_installchangelogs -i -O--buildsystem=ruby dh_installsystemduser -i -O--buildsystem=ruby dh_perl -i -O--buildsystem=ruby dh_link -i -O--buildsystem=ruby dh_strip_nondeterminism -i -O--buildsystem=ruby dh_compress -X.rb -i -O--buildsystem=ruby dh_fixperms -i -O--buildsystem=ruby dh_missing -i -O--buildsystem=ruby dh_ruby_fixdepends -i -O--buildsystem=ruby dh_installdeb -i -O--buildsystem=ruby dh_gencontrol -i -O--buildsystem=ruby dpkg-gencontrol: warning: Depends field of package ruby-rack-oauth2: substitution variable ${shlibs:Depends} used, but is not defined dh_md5sums -i -O--buildsystem=ruby dh_builddeb -i -O--buildsystem=ruby dpkg-deb: building package 'ruby-rack-oauth2' in '../ruby-rack-oauth2_1.19.0-1_all.deb'. dpkg-genbuildinfo --build=all dpkg-genchanges --build=all >../ruby-rack-oauth2_1.19.0-1_all.changes dpkg-genchanges: info: binary-only arch-indep upload (source code and arch-specific packages not included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) I: running special hook: sync-out /build/ruby-rack-oauth2-3c8zeb /tmp/ruby-rack-oauth2-1.19.0-1hp0kr4dn I: cleaning package lists and apt cache... I: creating tarball... I: done I: removing tempdir /tmp/mmdebstrap.928efOTZnz... I: success in 1961.9679 seconds md5: ruby-rack-oauth2_1.19.0-1_all.deb: OK sha1: ruby-rack-oauth2_1.19.0-1_all.deb: OK sha256: ruby-rack-oauth2_1.19.0-1_all.deb: OK Checksums: OK