Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
8293337e
Commit
8293337e
authored
9 years ago
by
Jaime Perez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Reformat and enhance the page that shows individual metadata entities.
parent
26317b41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/core/templates/show_metadata.tpl.php
+16
-8
16 additions, 8 deletions
modules/core/templates/show_metadata.tpl.php
modules/core/www/show_metadata.php
+14
-13
14 additions, 13 deletions
modules/core/www/show_metadata.php
with
30 additions
and
21 deletions
modules/core/templates/show_metadata.tpl.php
+
16
−
8
View file @
8293337e
<?php
<?php
$this
->
includeAtTemplateBase
(
'includes/header.php'
);
$this
->
includeAtTemplateBase
(
'includes/header.php'
);
?>
?>
<pre
class=
"metadatabox"
>
<div
class=
"metadatabox"
>
<button
data-clipboard-target=
"#metadata"
id=
"btncp"
class=
"btn topright"
style=
"margin-right: 0.5em;"
>
<img
src=
"
<?php
echo
$this
->
data
[
'baseurlpath'
]
.
'/resources/icons/clipboard.svg'
;
?>
"
alt=
"Copy to clipboard"
>
</button>
<pre
id=
"metadata"
>
$metadata['
<?php
echo
$this
->
data
[
'm'
][
'metadata-index'
];
unset
(
$this
->
data
[
'm'
][
'metadata-index'
])
?>
'] =>
<?php
$metadata['
<?php
echo
$this
->
data
[
'm'
][
'metadata-index'
];
unset
(
$this
->
data
[
'm'
][
'metadata-index'
])
?>
'] =>
<?php
echo
htmlspecialchars
(
var_export
(
$this
->
data
[
'm'
],
true
));
echo
htmlspecialchars
(
var_export
(
$this
->
data
[
'm'
],
true
));
?>
?>
</pre>
</pre>
<p>
[
<a
href=
"
<?php
echo
$this
->
data
[
'backlink'
];
?>
"
>
back
</a>
]
</p>
</div>
<script
type=
"text/javascript"
>
var
clipboard
=
new
Clipboard
(
'
#btncp
'
);
</script>
<br/>
<p><a
href=
"
<?php
echo
$this
->
data
[
'backlink'
];
?>
"
><span
class=
"btn"
>
Back
</span></a></p>
<?php
<?php
$this
->
includeAtTemplateBase
(
'includes/footer.php'
);
$this
->
includeAtTemplateBase
(
'includes/footer.php'
);
This diff is collapsed.
Click to expand it.
modules/core/www/show_metadata.php
+
14
−
13
View file @
8293337e
<?php
<?php
// load configuration
/* Load simpleSAMLphp, configuration */
$config
=
SimpleSAML_Configuration
::
getInstance
();
$config
=
SimpleSAML_Configuration
::
getInstance
();
$session
=
SimpleSAML_Session
::
getSessionFromRequest
();
$session
=
SimpleSAML_Session
::
getSessionFromRequest
();
SimpleSAML\Utils\Auth
::
requireAdmin
();
SimpleSAML\Utils\Auth
::
requireAdmin
();
if
(
!
array_key_exists
(
'entityid'
,
$_REQUEST
))
{
if
(
!
array_key_exists
(
'entityid'
,
$_REQUEST
))
throw
new
Exception
(
'required parameter [entityid] missing'
);
throw
new
Exception
(
'required parameter [entityid] missing'
);
}
if
(
!
array_key_exists
(
'set'
,
$_REQUEST
))
if
(
!
array_key_exists
(
'set'
,
$_REQUEST
))
{
throw
new
Exception
(
'required parameter [set] missing'
);
throw
new
Exception
(
'required parameter [set] missing'
);
if
(
!
in_array
(
$_REQUEST
[
'set'
],
array
(
'saml20-idp-remote'
,
'saml20-sp-remote'
,
'shib13-idp-remote'
,
'shib13-sp-remote'
)))
}
throw
new
Exception
(
'Invalid set'
);
if
(
!
in_array
(
$_REQUEST
[
'set'
],
array
(
'saml20-idp-remote'
,
'saml20-sp-remote'
,
'shib13-idp-remote'
,
'shib13-sp-remote'
)
))
{
throw
new
Exception
(
'Invalid set'
);
}
$metadata
=
SimpleSAML_Metadata_MetaDataStorageHandler
::
getMetadataHandler
();
$metadata
=
SimpleSAML_Metadata_MetaDataStorageHandler
::
getMetadataHandler
();
$m
=
$metadata
->
getMetadata
(
$_REQUEST
[
'entityid'
],
$_REQUEST
[
'set'
]);
$m
=
$metadata
->
getMetadata
(
$_REQUEST
[
'entityid'
],
$_REQUEST
[
'set'
]);
$t
=
new
SimpleSAML_XHTML_Template
(
$config
,
'core:show_metadata.tpl.php'
);
$t
=
new
SimpleSAML_XHTML_Template
(
$config
,
'core:show_metadata.tpl.php'
);
$t
->
data
[
'clipboard.js'
]
=
true
;
$t
->
data
[
'pageid'
]
=
'show_metadata'
;
$t
->
data
[
'pageid'
]
=
'show_metadata'
;
$t
->
data
[
'header'
]
=
'simpleSAMLphp Show Metadata'
;
$t
->
data
[
'header'
]
=
'simpleSAMLphp Show Metadata'
;
$t
->
data
[
'backlink'
]
=
SimpleSAML_Module
::
getModuleURL
(
'core/frontpage_federation.php'
);
$t
->
data
[
'backlink'
]
=
SimpleSAML_Module
::
getModuleURL
(
'core/frontpage_federation.php'
);
$t
->
data
[
'm'
]
=
$m
;
$t
->
data
[
'm'
]
=
$m
;
$t
->
show
();
$t
->
show
();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment