Authentication: UNI Login

Maintained by Picture of Jan Aagaard Meier Jan Aagaard Meier
This plugin allows users to login to moodle using the Danish UNI•Login service
8 sites
3 fans

Moodle UNI•Login authentication


  • Place the plugin in the folder auth/unilogin
  • You need codes and secrets for the webservice and application from UNI•C   


Applikations & WS ID + secrets

You should get these from UNI•C when registering

Login type

You can log users on in two way - using Single Sign-On (SSO) or Single Log In (SLI). Using SSO users are automatically logged in, if they are already logged into another service with theirUNI•Login. Using SLI they must always enter their credential.

Validation strategy

When a user has authenticated to UNI•Login he is sent back to moodle with a ticket. In addition to checking that the ticket matches the secret from  UNI•C, the ticket can be validated in two ways. 

Either all tickets are saved in the database, to ensure that a ticket is only used once, or a check is made to ensure that the ticket has beeen issued with a certain timeframe (see below).

Validation windows

The maximal age, in seconds that a ticket can have in order for it to be considered as valid. The window should not be shorter than the time it takes to redirect the user's browser.

Login behaviour, text and selector

Login can work in two ways:

  • Link will insert a link on moodle regular login page, using javascript
  • Redirect will redirect the user as soon as they click login. This means users will only be able to login with uinlogin.

Lock user fields

Allows you to choose if the fields should be updated on creation or on each login, and if users should be allowed to update the fields themselves.


Screenshot #0
Screenshot #1


Picture of Jan Aagaard Meier
Jan Aagaard Meier (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of David Mudrák
    Tue, 24 Feb 2015, 11:11 PM
    Thanks Jan for sharing this plugin with the community. It's written in a clean way and the code is easy to follow. I appreciate paying attention to many details in Moodle coding guidelines.
    While reviewing the code, I spotted two issues that are quite simple to fix now, yet could cause much more troubles if we started to distribute the plugin now. I reported them as issues #1 and #2 in your bug tracker.
    I'll be happy to approve this plugin once the reported issues are fixed and a new version is uploaded here.
  • Picture of David Mudrák
    Wed, 25 Feb 2015, 4:41 AM
    Thanks Jan for fixing the issues promptly. You are cleared to land now, welcome to the Plugins directory!
  • Picture of Jan Aagaard Meier
    Wed, 25 Feb 2015, 4:22 PM
    Thanks for the swift review David smile
  • Picture of Anders Stausholm Kühl
    Sat, 7 Mar 2015, 4:46 AM
    Tak Jan - har set efter dette et stykke tid smile
  • Picture of Jan Aagaard Meier
    Sat, 7 Mar 2015, 11:05 PM
    Det er jeg glad for at høre Anders. Jeg vil meget gerne høre din feedback på modulet, enten her eller på hvis du har nogle specifikke problemer.

    I øjeblikket understøtter modulet kun simpel login og oprettelse af brugere, men jeg tænker at man, hvis der er efterspørgsel for det, relativt nemt kunne udvide til at tildele roller og tilmelde kurser afhængigt af de funktionsmarkeringer som returneres fra UNI C
  • Picture of Morten Abrahamsen
    Wed, 4 Jul 2018, 9:41 PM
    Hej. Vi er interesseret i at udvikle Moodle til nogle danske skoler men der er i dag krav til brug af Uni Login. Vi vil meget gerne bruge Moodle Desktop og Moodle App. Vil Uni Login virke med disse platforme? Paa forhaand tak. Mvh Morten
Please login to post comments