Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • perun/perun-proxyidp/v1/simplesamlphp-module-elixir
1 result
Show changes
Commits on Source (11)
Showing with 1908 additions and 698 deletions
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [7.4, 8.0]
composer-version: [1, 2]
steps:
- uses: actions/checkout@v3
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-version }}
version: ${{ matrix.composer-version }}
php_extensions: curl iconv intl json ldap
- name: Run easy coding standard
run: vendor/bin/ecs check
release:
name: Release
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm install && npx semantic-release
.idea
*.iml
out
gen
## Ansible
modules/
vendor/
*.retry
## composer
composer.phar
/vendor/
## Java
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
## JetBrains
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
.idea/modules.xml
.idea/*.iml
.idea/modules
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
## macOS
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
## maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
## node
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
#DynamoDB Local files
.dynamodb/
## Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
## vim
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
## Visual Studio
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
bower_components/
# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true
**/wwwroot/lib/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
## Windows
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
include:
- project: perun-proxy-aai/common
file: /templates/.gitlab-ci-template.yml
## Ansible
*.retry
## composer
composer.phar
/vendor/
## Java
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
## JetBrains
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
.idea/modules.xml
.idea/*.iml
.idea/modules
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
## macOS
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
## maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
## node
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
#DynamoDB Local files
.dynamodb/
## Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
## vim
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
## Visual Studio
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
bower_components/
# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true
**/wwwroot/lib/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
## Windows
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
package-lock.json
composer.lock
CHANGELOG.md
.git
*.min.css
*.min.js
www/res/bootstrap/css/bootstrap-theme.css
www/res/bootstrap/css/bootstrap.css
www/res/bootstrap/js/bootstrap.js
www/res/bootstrap/js/npm.js
www/res/js/jquery.js
{}
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
["@semantic-release/git", {
"assets": ["CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
]
}
{ "extends": ["@perun-proxy-aai/semantic-release-proxy-config"] }
# [6.0.0](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-elixir/compare/v5.1.5...v6.0.0) (2022-11-28)
### Features
* 🎸 Refactored disco, use own config file ([b81cf80](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-elixir/commit/b81cf801eb5470c6ea5700638f4f372fe9ea9543))
### BREAKING CHANGES
* needs its own config file module_elixir.php
## [5.1.5](https://github.com/CESNET/elixir-aai-proxy-idp-template/compare/v5.1.4...v5.1.5) (2022-09-01)
......
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# These owners will be the default owners for everything in the repo.
* @pajavyskocil @dBucik
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
#*.php @login
# You can also use email addresses if you prefer.
#* login@example.com
\ No newline at end of file
BSD 2-Clause License
BSD 3-Clause License
Copyright (c) 2017, ELIXIR Hub
All rights reserved.
Copyright (c) 2022, CESNET, z. s. p. o. and Institute of Computer Science, Masaryk University
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
......@@ -22,4 +25,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
......@@ -7,7 +7,6 @@
Template for ELIXIR AAI Proxy IdP component
## Contribution
This repository uses [Conventional Commits](https://www.npmjs.com/package/@commitlint/config-conventional).
......@@ -15,10 +14,11 @@ This repository uses [Conventional Commits](https://www.npmjs.com/package/@commi
Any change that significantly changes behavior in a backward-incompatible way or requires a configuration change must be marked as BREAKING CHANGE.
### Available scopes:
* theme
* Auth Process filters:
* cscmfa
- theme
- Auth Process filters:
- cscmfa
## Instalation
`php composer.phar require`
`php composer.phar require`
{
"name": "elixir/simplesamlphp-module-elixir",
"description": "A SimpleSAMLphp module providing template for DiscoPower and user-facing parts of the SSP for ELIXIR",
"type": "simplesamlphp-module",
"keywords": ["ELIXIR", "elixir", "simplesamlphp"],
"license": "BSD-2-Clause",
"authors": [
{
"name": "Pavel Vyskocil",
"email": "vyskocilpavel@muni.cz"
},
{
"name": "Michal Prochazka",
"email": "michalp@ics.muni.cz"
},
{
"name": "Dominik Frantisek Bucik",
"email": "bucik@ics.muni.cz"
}
],
"require": {
"simplesamlphp/composer-module-installer": "~1.0",
"simplesamlphp/simplesamlphp": "~v1.19.0",
"cesnet/simplesamlphp-module-perun": "^v9.0.0",
"cesnet/simplesamlphp-module-proxystatistics": "^v8.0.0",
"ext-json": "*",
"ext-curl": "*",
"ext-pdo": "*"
"name": "elixir/simplesamlphp-module-elixir",
"description": "A SimpleSAMLphp module providing template for DiscoPower and user-facing parts of the SSP for ELIXIR",
"type": "simplesamlphp-module",
"keywords": [
"ELIXIR",
"elixir",
"simplesamlphp"
],
"license": "BSD-3-Clause",
"require": {
"simplesamlphp/composer-module-installer": "~1.0",
"simplesamlphp/simplesamlphp": "~v1.19.0",
"cesnet/simplesamlphp-module-perun": "^v9.0.0",
"cesnet/simplesamlphp-module-proxystatistics": "^v8.0.0",
"ext-json": "*",
"ext-curl": "*",
"ext-pdo": "*"
},
"config": {
"platform": {
"php": "7.4"
},
"require-dev": {
"symplify/easy-coding-standard": "^9.4"
},
"config": {
"allow-plugins": {
"simplesamlphp/composer-module-installer": true
}
"allow-plugins": {
"simplesamlphp/composer-module-installer": true
}
},
"authors": [
{
"name": "Perun proxy AAI team",
"email": "proxyidp@cesnet.cz"
}
]
}
This diff is collapsed.
......@@ -2,27 +2,27 @@
declare(strict_types=1);
/**
* The config template for module ELIXIR.
*/
$config = [
/*
* The clientId from CSC_MFA server
*/
'clientId' => '',
/*
* The clientSecret from CSC_MFA server
*/
'clientSecret' => '',
use SimpleSAML\Module\elixir\Disco;
use SimpleSAML\Module\elixir\discowarning\WarningConfiguration;
/*
* List of requested scopes
*/
'requestedScopes' => [],
/*
* The openid configuration url of CSC_MFA server
*/
'openidConfigurationUrl' => '',
$config = [
Disco::DISCO => [
// required upstream IdP, that will be used as chosen IdP
Disco::UPSTREAM_IDP_ENTITY_ID => 'https://proxy.aai.lifescience-ri.eu/proxy',
// warning configuration
WarningConfiguration::WARNING_CONFIG => [
// enabled or not
WarningConfiguration::ENABLED => true,
// type of the warning - type ERROR prevents users from continuing to log in
WarningConfiguration::TYPE => WarningConfiguration::WARNING_TYPE_WARNING,
// displayed title - provide English version of the text
WarningConfiguration::TITLE => [
'en' => 'Sample warning title',
],
// displayed text - provide English version of the text
WarningConfiguration::TEXT => [
'en' => 'Sample warning text',
],
],
],
];
{
"warning_header": {
"en": "Warning!"
},
"warning_continue": {
"en": "Continue"
}
}
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer;
use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/ecs.php',
__DIR__ . '/config-templates',
__DIR__ . '/themes',
__DIR__ . '/www',
]);
$parameters->set(Option::PARALLEL, true);
$parameters->set(Option::SKIP, [NotOperatorWithSuccessorSpaceFixer::class, FunctionTypehintSpaceFixer::class]);
$containerConfigurator->import(SetList::PHP_CS_FIXER);
$containerConfigurator->import(SetList::CLEAN_CODE);
$containerConfigurator->import(SetList::SYMPLIFY);
$containerConfigurator->import(SetList::ARRAY);
$containerConfigurator->import(SetList::COMMON);
$containerConfigurator->import(SetList::COMMENTS);
$containerConfigurator->import(SetList::CONTROL_STRUCTURES);
$containerConfigurator->import(SetList::DOCBLOCK);
$containerConfigurator->import(SetList::NAMESPACES);
$containerConfigurator->import(SetList::PHPUNIT);
$containerConfigurator->import(SetList::SPACES);
$containerConfigurator->import(SetList::STRICT);
$containerConfigurator->import(SetList::SYMFONY);
$containerConfigurator->import(SetList::PSR_12);
$services = $containerConfigurator->services();
$services->set(ArraySyntaxFixer::class)
->call('configure', [[
'syntax' => 'short',
]])
;
};
......@@ -4,12 +4,7 @@ namespace SimpleSAML\Module\elixir;
class ConsentHelper
{
public function __construct()
{
}
const EU_EAA = [
private const EU_EAA = [
'AT' => 'Austria',
'BE' => 'Belgium',
'BG' => 'Bulgaria',
......@@ -42,6 +37,10 @@ class ConsentHelper
'GB' => 'United Kingdom',
];
public function __construct()
{
}
public static function getJurisdiction($dstMetadata): string
{
$countryCodes = json_decode(file_get_contents('http://country.io/names.json'), true);
......@@ -121,16 +120,26 @@ class ConsentHelper
echo ' <h6>This service is ' . $parsedJurisdiction . '</h6>' . PHP_EOL;
}
if ($parsedJurisdiction === 'EMBL') {
echo ' <p>In order to access the requested services, the Life Science Login needs to transfer your personal data to an international organization outside EU/EEA jurisdictions.<br/><i>Please be aware that upon transfer your personal data will be protected by <a href="https://www.embl.org/documents/document/internal-policy-no-68-on-general-data-protection/" target="_blank">EMBL’s Internal Policy 68 on General Data Protection</a>.</i>' . PHP_EOL;
echo ' <p>In order to access the requested services, the Life Science Login needs to transfer ' .
'your personal data to an international organization outside EU/EEA jurisdictions.<br/>' .
'<i>Please be aware that upon transfer your personal data will be protected by <a href="' .
'https://www.embl.org/documents/document/internal-policy-no-68-on-general-data-protection/"' .
' target="_blank">EMBL’s Internal Policy 68 on General Data Protection</a>.</i>' . PHP_EOL;
} else {
echo ' <p>In order to access the requested services, the Life Science Login needs to transfer your personal data to a country outside EU/EEA. We cannot guarantee that this country offers an adequately high level of personal data protection as EU/EEA countries.</p>' . PHP_EOL;
echo ' <p>In order to access the requested services, the Life Science Login needs to transfer ' .
'your personal data to a country outside EU/EEA. We cannot guarantee that this country offers ' .
'an adequately high level of personal data protection as EU/EEA countries.</p>' . PHP_EOL;
}
if (false !== $spPrivacyPolicy) {
echo '<h6>Please, read the <a target="_blank" href="' .$spPrivacyPolicy . '">Privacy Policy</a> of the service provider to learn more about its commitments to protect your data.' . PHP_EOL;
echo '<h6>Please, read the <a target="_blank" href="' . $spPrivacyPolicy .
'">Privacy Policy</a> of the service provider to learn more about its ' .
'commitments to protect your data.' . PHP_EOL;
}
echo ' <div class="form-check">' . PHP_EOL;
echo ' <input class="form-check-input" type="checkbox" name="transfer" id="transfer" data-np-checked="1">' . PHP_EOL;
echo ' <label class="form-check-label" for="transfer">To continue, consent to the transfer of your personal data.</label>' . PHP_EOL;
echo ' <input class="form-check-input" type="checkbox" name="transfer" id="transfer"' .
' data-np-checked="1">' . PHP_EOL;
echo ' <label class="form-check-label" for="transfer">To continue, consent to the transfer of ' .
'your personal data.</label>' . PHP_EOL;
echo ' </div>' . PHP_EOL;
echo '</div>' . PHP_EOL;
}
......@@ -149,8 +158,12 @@ class ConsentHelper
{
if ((!empty($dstMetadata['test.sp']) && $dstMetadata['test.sp']) || empty($dstMetadata['accepted_tos'])) {
echo '<div class="alert alert-warning" role="alert">' . PHP_EOL;
echo ' <p>You are entering a service that is in the test environment of Life Science Login. The test environment is for service developers to test their relying service’s AAI integration before requesting to move them to the Life Science Login production environment.</p>' . PHP_EOL;
echo ' <p>The test environment is not intended for common users. You are able to access the service because you have opted in as a test user. You need to refresh your registration every 30 days.</p>' . PHP_EOL;
echo ' <p>You are entering a service that is in the test environment of Life Science Login. ' .
'The test environment is for service developers to test their relying service’s AAI integration ' .
'before requesting to move them to the Life Science Login production environment.</p>' . PHP_EOL;
echo ' <p>The test environment is not intended for common users. You are able to access the service ' .
'because you have opted in as a test user. You need to refresh your registration every 30 days.</p>' .
PHP_EOL;
echo '</div>' . PHP_EOL;
}
}
......@@ -172,7 +185,5 @@ class ConsentHelper
}
return htmlspecialchars($dstName);
}
}
\ No newline at end of file
}
......@@ -4,14 +4,10 @@ declare(strict_types=1);
namespace SimpleSAML\Module\elixir;
use SimpleSAML\Auth\State;
use SimpleSAML\Configuration;
use SimpleSAML\Logger;
use SimpleSAML\Module\authswitcher\DiscoUtils;
use SimpleSAML\Module\discopower\PowerIdPDisco;
use SimpleSAML\Module\perun\Auth\Process\MultifactorAcrs;
use SimpleSAML\Module\perun\model\WarningConfiguration;
use SimpleSAML\Utils\HTTP;
use SimpleSAML\Module\elixir\discowarning\WarningConfiguration;
/**
* This class implements a IdP discovery service.
......@@ -24,156 +20,79 @@ use SimpleSAML\Utils\HTTP;
*/
class Disco extends PowerIdPDisco
{
public const CONFIG_FILE_NAME = 'module_perun.php';
private const DEBUG_PREFIX = "elixir:Disco - :";
public const URN_CESNET_PROXYIDP_IDPENTITYID = 'urn:cesnet:proxyidp:idpentityid:';
public const CONFIG_FILE_NAME = 'module_elixir.php';
public const LS_IDP = 'https://proxy.aai.lifescience-ri.eu/proxy';
// ROOT CONFIGURATION ENTRY
public const WAYF = 'wayf_config';
public const INTERFACE = 'interface';
public const RPC = 'rpc';
public const REMOVE_AUTHN_CONTEXT_CLASS_PREFIXES = 'remove_authn_context_class_ref_prefixes';
public const ADD_AUTHN_CONTEXT_CLASSES_FOR_MFA = 'add_authn_context_classes_for_mfa';
public const RETURN = 'return';
public const AUTHN_CONTEXT_CLASS_REF = 'AuthnContextClassRef';
public const AUTH_ID = 'AuthID';
public const WARNING_ATTRIBUTES = 'warningAttributes';
public const SAML_SP_SSO = 'saml:sp:sso';
public const AUTH_ID = 'AuthID';
public const WARNING = 'warningAttributes';
public const CONTINUE_URL = 'continueUrl';
// STATE KEYS
public const SAML_REQUESTED_AUTHN_CONTEXT = 'saml:RequestedAuthnContext';
public const STATE_AUTHN_CONTEXT_CLASS_REF = 'AuthnContextClassRef';
// ROOT CONFIGURATION ENTRY
public const SAML_SP_SSO = 'saml:sp:sso';
public const DISCO = 'disco';
public const NAME = 'name';
public const UPSTREAM_IDP_ENTITY_ID = 'upstream_idp_entity_id';
// VARIABLES
private array $originalAuthnContextClassRef = [];
private $discoConfiguration;
private $wayfConfiguration;
private $upstreamIdpEntityId;
private Configuration $perunModuleConfiguration;
private $proxyIdpEntityId;
private $state;
private $warningConfiguration = null;
public function __construct(array $metadataSets, $instance)
{
//LOAD CONFIG FOR MODULE PERUN, WHICH CONTAINS WAYF CONFIGURATION
parent::__construct($metadataSets, $instance);
try {
$this->perunModuleConfiguration = Configuration::getConfig(self::CONFIG_FILE_NAME);
$this->wayfConfiguration = $this->perunModuleConfiguration->getConfigItem(self::WAYF);
$elixirConfig = Configuration::getConfig(self::CONFIG_FILE_NAME);
if (empty($elixirConfig->getValue(self::DISCO, []))) {
Logger::error(self::DEBUG_PREFIX . "missing key '" . self::DISCO . "' in module config file");
throw new \Exception();
}
$this->discoConfiguration = $elixirConfig->getConfigItem(self::DISCO);
} catch (\Exception $ex) {
Logger::error("perun:disco-tpl: missing or invalid '" . self::CONFIG_FILE_NAME . "' config file");
Logger::error(self::DEBUG_PREFIX . "missing or invalid '" . self::CONFIG_FILE_NAME . "' config file");
throw $ex;
}
if (!array_key_exists(self::RETURN, $_GET)) {
throw new \Exception('Missing parameter: ' . self::RETURN);
$this->upstreamIdpEntityId = $this->discoConfiguration->getString(self::UPSTREAM_IDP_ENTITY_ID, '');
if (empty($this->upstreamIdpEntityId)) {
Logger::error(
self::DEBUG_PREFIX
. "missing setting of upstream IdP that should be used. Use option '"
. self::UPSTREAM_IDP_ENTITY_ID
. "' in the discovery page configuration block to set the EntityID of the IdP"
);
}
$returnURL = HTTP::checkURLAllowed($_GET[self::RETURN]);
parse_str(parse_url($returnURL)['query'], $query);
if (isset($query[self::AUTH_ID])) {
$id = explode(':', $query[self::AUTH_ID])[0];
$state = State::loadState($id, self::SAML_SP_SSO, true);
if (null !== $state) {
if (isset($state[self::SAML_REQUESTED_AUTHN_CONTEXT][self::AUTHN_CONTEXT_CLASS_REF])) {
$this->originalAuthnContextClassRef = $state[self::SAML_REQUESTED_AUTHN_CONTEXT][self::AUTHN_CONTEXT_CLASS_REF];
$this->removeAuthContextClassRefWithPrefixes($state);
DiscoUtils::setUpstreamRequestedAuthnContext($state);
if (isset($state['IdPMetadata']['entityid'])) {
$this->proxyIdpEntityId = $state['IdPMetadata']['entityid'];
}
State::saveState($state, self::SAML_SP_SSO);
}
$e = explode('=', $returnURL)[0];
$newReturnURL = $e . '=' . urlencode($id);
$_GET[self::RETURN] = $newReturnURL;
}
$this->state = $state;
if ($this->discoConfiguration->hasValue(WarningConfiguration::WARNING_CONFIG)) {
$this->warningConfiguration = new WarningConfiguration();
}
parent::__construct($metadataSets, $instance);
}
/**
* Handles a request to this discovery service. It is entry point of Discovery service.
*
* The IdP disco parameters should be set before calling this function.
*/
public function handleRequest()
{
$this->start();
// IF IS SET AUTHN CONTEXT CLASS REF, REDIRECT USER TO THE IDP
if (!empty($this->originalAuthnContextClassRef)) {
// Check authnContextClassRef and select IdP directly if the correct value is set
foreach ($this->originalAuthnContextClassRef as $value) {
// VERIFY THE PREFIX IS CORRECT AND WE CAN PERFORM THE REDIRECT
$acrStartSubstr = substr($value, 0, strlen(self::URN_CESNET_PROXYIDP_IDPENTITYID));
if (self::URN_CESNET_PROXYIDP_IDPENTITYID === $acrStartSubstr) {
$idpEntityId = substr($value, strlen(self::URN_CESNET_PROXYIDP_IDPENTITYID), strlen($value));
if ($idpEntityId === $this->proxyIdpEntityId) {
continue;
}
Logger::info('Redirecting to ' . $idpEntityId);
$continueUrl = self::buildContinueUrl(
$this->spEntityId,
$this->returnURL,
$this->returnIdParam,
$idpEntityId
);
HTTP::redirectTrustedURL($continueUrl);
exit;
}
}
}
$continueUrl = self::buildContinueUrl(
$this->spEntityId,
$this->returnURL,
$this->returnIdParam,
!empty($this->state['aarc_hinted_idp']) ? $this->state['aarc_hinted_idp'] : self::LS_IDP
$this->spEntityId,
$this->returnURL,
$this->returnIdParam,
$this->upstreamIdpEntityId
);
$warningInstance = WarningConfiguration::getInstance();
$warningAttributes = $warningInstance->getWarningAttributes();
$t = new DiscoTemplate($this->config);
$t->data[self::WARNING_ATTRIBUTES] = $warningAttributes;
$t->data[self::WARNING] = $this->warningConfiguration;
$t->data[self::CONTINUE_URL] = $continueUrl;
$t->show();
}
/**
* @param $entityID
* @param $return
* @param $returnIDParam
* @param $idpEntityId
*
* @return string url where user should be redirected when he choose idp
*/
public static function buildContinueUrl(
private static function buildContinueUrl(
string $entityID,
string $return,
string $returnIDParam,
......@@ -185,36 +104,4 @@ class Disco extends PowerIdPDisco
'returnIDParam=' . urlencode($returnIDParam) . '&' .
'idpentityid=' . urlencode($idpEntityId);
}
/**
* This method remove all AuthnContextClassRef which start with prefix from configuration.
*
* @param mixed $state
*/
public function removeAuthContextClassRefWithPrefixes(&$state)
{
$prefixes = $this->wayfConfiguration->getArray(self::REMOVE_AUTHN_CONTEXT_CLASS_PREFIXES, []);
if (empty($prefixes)) {
return;
}
unset($state[self::SAML_REQUESTED_AUTHN_CONTEXT][self::STATE_AUTHN_CONTEXT_CLASS_REF]);
$filteredAcrs = [];
foreach ($this->originalAuthnContextClassRef as $acr) {
$acr = trim($acr);
$retain = true;
foreach ($prefixes as $prefix) {
if (substr($acr, 0, strlen($prefix)) === $prefix) {
$retain = false;
break;
}
}
if ($retain) {
$filteredAcrs[] = $acr;
}
}
if (!empty($filteredAcrs)) {
$state[self::SAML_REQUESTED_AUTHN_CONTEXT][self::STATE_AUTHN_CONTEXT_CLASS_REF] = $filteredAcrs;
}
}
}
......@@ -15,7 +15,6 @@ use SimpleSAML\XHTML\Template;
*/
class DiscoTemplate extends Template
{
public const NAME = 'name';
/**
......
<?php
declare(strict_types=1);
namespace SimpleSAML\Module\elixir\discowarning;
use SimpleSAML\Configuration;
use SimpleSAML\Module\elixir\Disco;
/**
* Class WarningConfiguration provides an option to load warning in disco-tpl from different types of sources.
*/
class WarningConfiguration
{
public const CONFIG_FILE_NAME = 'module_elixir.php';
public const WARNING_CONFIG = 'warning_config';
public const TYPE = 'type';
public const ENABLED = 'enabled';
public const TITLE = 'title';
public const TEXT = 'text';
public const WARNING_TYPE_INFO = 'INFO';
public const WARNING_TYPE_WARNING = 'WARNING';
public const WARNING_TYPE_ERROR = 'ERROR';
public const ALLOWED_TYPES = [self::WARNING_TYPE_INFO, self::WARNING_TYPE_WARNING, self::WARNING_TYPE_ERROR];
private bool $enabled = false;
private string $type = '';
private array $title = [];
private array $text = [];
/**
* Function returns the instance of WarningConfiguration.
*/
public function __construct()
{
$config = Configuration::getConfig(self::CONFIG_FILE_NAME)
->getConfigItem(Disco::DISCO)
->getConfigItem(self::WARNING_CONFIG, []);
if (empty($config)) {
return;
}
$this->enabled = $config->getBoolean(self::ENABLED, false);
$this->type = $config->getValueValidate(self::TYPE, self::ALLOWED_TYPES);
$this->title = $config->getArray(self::TITLE);
$this->text = $config->getArray(self::TEXT);
}
public function isEnabled(): bool
{
return $this->enabled;
}
public function getType(): string
{
return $this->type;
}
public function getTitle(): array
{
return $this->title;
}
public function getText(): array
{
return $this->text;
}
}