You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Discovery may be used also in embedded fashion. For that to work authentication needs to be triggered from a page that includes javascript that provides the functionality. Here we provide examples for Shibboleth SP and SimpleSAMLphp.

Shibboleth SP

In the example we first configure eduTEAMS discovery to be used by default login handler.

file:/etc/shibboleth/shibboleth2.xml
<SSO
    discoveryProtocol="SAMLDS" 
    discoveryURL="https://discovery.eduteams.org/wayf.php">
    SAML2 SAML1 
</SSO>

If you use the discovery in embedded fashion you need to include javascript in  head element on the page triggering the authentication,

Including javascript
<head>
    <!-- HTML elements -->
    <script type="text/javascript" src="https://discovery.eduteams.org/ds.js"></script>
    <!-- HTML elements -->
</head>

and then display the element itself that triggers the authentication as defined in default handler.

Login element
<a href="/Shibboleth.sso/Login" onclick="startOverlay(event)">Log in</a>

As a result the discovery is shown in embedded fashion.

SimpleSAMLphp

In the example we first set eduTEAMS discovery to be used by default sp configuration.

authsources.php
'default-sp' => array(
    'saml:SP',
    'entityID' => 'https://sp.example.com/simplesaml/',
    'idp' => NULL,
    'discoURL' => 'https://discovery.eduteams.org/wayf.php',
    'privatekey' => 'example.key'
),

If you use the discovery in embedded fashion you need to include javascript in  head element on the page triggering the authentication,

Including javascript
<head>
    <!-- HTML elements -->
    <script type="text/javascript" src="https://discovery.eduteams.org/ds.js"></script>
    <!-- HTML elements -->
</head>

and then display a element triggering the authentication.

Login element
<a href="/simplesaml/module.php/core/authenticate.php" onclick="startOverlay(event)">Log in</a>
  • No labels