Skip to content

Commit 631627a

Browse files
committed
Initial import
1 parent 53068df commit 631627a

File tree

51 files changed

+6350
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+6350
-0
lines changed

.codecov.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
coverage:
2+
status:
3+
project: yes
4+
5+
comment:
6+
layout: "diff"
7+
behavior: once
8+
require_changes: true
9+
require_base: no
10+
require_head: yes
11+
branches: null

.php_cs.dist

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
$finder = PhpCsFixer\Finder::create()
3+
->in([
4+
__DIR__ . '/config-templates',
5+
__DIR__ . '/hooks',
6+
__DIR__ . '/tests',
7+
__DIR__ . '/www',
8+
])
9+
;
10+
return PhpCsFixer\Config::create()
11+
->setRules([
12+
'@PSR2' => true,
13+
'@PSR4' => true,
14+
'@PSR5' => true,
15+
])
16+
->setFinder($finder)
17+
;

.travis.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
sudo: required
2+
3+
language: php
4+
5+
php:
6+
- 5.5
7+
- 5.6
8+
- 7.0
9+
- 7.1
10+
- 7.2
11+
- 7.3
12+
13+
env:
14+
- SIMPLESAMLPHP_VERSION=1.17.*
15+
16+
before_script:
17+
- composer require "simplesamlphp/simplesamlphp:${SIMPLESAMLPHP_VERSION}" --no-update
18+
- composer update --no-interaction
19+
- if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then composer require --dev vimeo/psalm:1.1.9; fi
20+
21+
script:
22+
- bin/check-syntax.sh
23+
- if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then php vendor/phpunit/phpunit/phpunit; else php vendor/phpunit/phpunit/phpunit --no-coverage; fi
24+
- if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then vendor/bin/psalm; fi
25+
26+
after_success:
27+
# Codecov, need to edit bash uploader for incorrect TRAVIS_PYTHON_VERSION environment variable matching, at least until codecov/codecov-bash#133 is resolved
28+
- curl -s https://codecov.io/bash > .codecov
29+
- sed -i -e 's/TRAVIS_.*_VERSION/^TRAVIS_.*_VERSION=/' .codecov
30+
- chmod +x .codecov
31+
- if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then ./.codecov -X gcov; fi
32+
# - if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then bash <(curl -s https://codecov.io/bash); fi

bin/check-syntax.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
PHP='/usr/bin/env php'
4+
RETURN=0
5+
6+
# check PHP files
7+
for FILE in `find config-templates hooks tests templates www -name "*.php"`; do
8+
$PHP -l $FILE > /dev/null 2>&1
9+
if [ $? -ne 0 ]; then
10+
echo "Syntax check failed for ${FILE}"
11+
RETURN=`expr ${RETURN} + 1`
12+
fi
13+
done
14+
15+
exit $RETURN

composer.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "simplesamlphp/simplesamlphp-module-consentadmin",
3+
"description": "A module that allows users to manage their consent",
4+
"type": "simplesamlphp-module",
5+
"keywords": ["simplesamlphp", "consentadmin"],
6+
"license": "LGPL-3.0-or-later",
7+
"authors": [
8+
{
9+
"name": "Jacob Christiansen",
10+
"email": "jach@wayf.dk"
11+
},
12+
{
13+
"name": "Olav Morken",
14+
"email": "lavmrk@gmail.com"
15+
}
16+
],
17+
"config": {
18+
"preferred-install": {
19+
"simplesamlphp/simplesamlphp": "source",
20+
"*": "dist"
21+
}
22+
},
23+
"autoload-dev": {
24+
"psr-4": {
25+
"SimpleSAML\\Test\\Utils\\": "vendor/simplesamlphp/simplesamlphp/tests/Utils"
26+
}
27+
},
28+
"require": {
29+
"php": ">=5.5",
30+
"simplesamlphp/composer-module-installer": "~1.1",
31+
"simplesamlphp/simplesamlphp-module-consent": "^1.0",
32+
"webmozart/assert": "~1.4"
33+
},
34+
"require-dev": {
35+
"simplesamlphp/simplesamlphp": "^1.17",
36+
"phpunit/phpunit": "~4.8.36"
37+
},
38+
"extra": {
39+
"ssp-mixedcase-module-name": "consentAdmin"
40+
},
41+
"support": {
42+
"issues": "https://github.com/tvdijen/simplesamlphp-module-consentadmin/issues",
43+
"source": "https://github.com/tvdijen/simplesamlphp-module-consentadmin"
44+
}
45+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* Config file for consentAdmin
4+
*
5+
* @author Jacob Christiansen, <jach@wayf.dk>
6+
* @package SimpleSAMLphp
7+
*/
8+
$config = [
9+
/*
10+
* Configuration for the database connection.
11+
*/
12+
'consentadmin' => [
13+
'consent:Database',
14+
'dsn' => 'mysql:host=DBHOST;dbname=DBNAME',
15+
'username' => 'USERNAME',
16+
'password' => 'PASSWORD',
17+
],
18+
19+
// Hash attributes including values or not
20+
'attributes.hash' => true,
21+
22+
// If you set attributes.exclude in the consent module, this must match
23+
// 'attributes.exclude' => [],
24+
25+
// Where to direct the user after logout
26+
// REMEMBER to prefix with http:// otherwise the relaystate is only appended
27+
// to saml2 logout URL
28+
'returnURL' => 'http://www.wayf.dk',
29+
30+
// Shows description of the services if set to true (defaults to true)
31+
'showDescription' => true,
32+
33+
// Set authority
34+
'authority' => 'saml2',
35+
];

default-enable

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file indicates that the default state of this module
2+
is enabled. To disable, create a file named disable in the
3+
same directory as this file.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"sp_empty_description": {
3+
"en": "(no description)"
4+
},
5+
"attribute_org": {
6+
"en": "Organisation"
7+
},
8+
"added": {
9+
"en": "Consent Added"
10+
},
11+
"removed": {
12+
"en": "Consent Removed"
13+
},
14+
"updated": {
15+
"en": "Consent Updated"
16+
},
17+
"unknown": {
18+
"en": "Unknown ..."
19+
},
20+
"attribute_id": {
21+
"en": "Identity"
22+
},
23+
"attribute_injected": {
24+
"en": "Injected attribut"
25+
},
26+
"show": {
27+
"en": "Show"
28+
},
29+
"hide": {
30+
"en": "Hide"
31+
},
32+
"attributes_text": {
33+
"en": "attributes"
34+
},
35+
"consentadmin_header": {
36+
"en": "Consent Administration"
37+
},
38+
"consentadmin_description1": {
39+
"en": "Here you can view and edit your consent for the Service Providers."
40+
},
41+
"consentadmin_description2": {
42+
"en": "\n<h3>How to delete your consent<\/h3>\nUncheck the box corresponding to the service provider\n\n<h3>Links<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.wayf.dk\">Start<\/a> <\/li>\n\n<li><a href=\"https:\/\/www.wayf.dk\/FAQ\">FAQ<\/a> <\/li>\n<\/ul>\n"
43+
},
44+
"login": {
45+
"en": "login"
46+
},
47+
"service_providers_for": {
48+
"en": "Service Providers for"
49+
},
50+
"service_provider_header": {
51+
"en": "Service Provider"
52+
},
53+
"status_header": {
54+
"en": "Consent status"
55+
},
56+
"show_hide_attributes": {
57+
"en": "show\/hide attributes"
58+
},
59+
"consentadmin_purpose": {
60+
"en": "The purpose of the service is"
61+
},
62+
"link_consentAdmin": {
63+
"en": "Consent administration"
64+
}
65+
}

0 commit comments

Comments
 (0)