Skip navigation
This discussion is archived

using PHP scripts to authenticate - "unique_name_from_itunes" ???

1263 Views 7 Replies Latest reply: Jan 25, 2008 11:17 PM by donlaur RSS
JASJ Calculating status...
Currently Being Moderated
Sep 12, 2007 11:02 AM
We are attempting to use the PHP scripts (version 1.1) designed by Aaron Axelsen of University of Wisconsin - Whitewater ( to help facilitate authentication to iTunes U. We're bouncing credentials off our AD via PHP and LDAP, and once the user is authenticated, we're attempting to authorize them with the appropriate level of permission to iTunes U. To start off we're keeping it really simple. We have three levels: admin, instructor, and student. The administrative login works, but when we attempt to authorize a student or instructor, it appears to work but then brings the student to a blank iTune Store page. It does not recognize the identity string. Here's the debug output:



+The destination string is valid and the corresponding destination item was found.+

+The identity string is valid and provides the following information:+
+Display Name Training Test01+
+Email Address
+Username testt+
+User Identifier userid+

+The credential string is valid but contains no known credentials.+

+The credential string contains the following credential which is not used within iTunes U:+



At the end of the Student credential string there it says "uniquename_fromitunes" - what is suppose to be there and where/how do I obtain that data string?

I have emailed the developer of these scripts and am awaiting his reply, but was hoping someone here might be able to help. Any help would be extremely appreciated. I'm befuddled at the moment and suspect the answer is a simple one.

Other OS, RHEL AS 4 w/ Apache, PHP, MySQL
  • Jacob L. Hackamack Calculating status...
    The unique name that you are referring to usually contains the course numbers for authenticating users.
    MacBook Pro 2.4GHz, 160 Gig HD, VMWare, Mac OS X (10.4.10), PHP, MySQL, Filemaker 9
  • Aaron Axelsen Level 1 Level 1 (15 points)
    Below is an example of what I'm passing:

    Identity "Username" <> (username) [username]
    Time 1189626161

    2077-fairhaven-series is the unqiue name that I gave the iTunes U course when I created it.

    The student credential for that same course would simply be:
  • Ken Newquist Level 1 Level 1 (45 points)
    It's been a while since I mucked around with credentials, and I'm doing this via Perl rather than PHP, but the principle is the same. To give students site-level browse capability within iTunes U, I've created a credential called "" and given it download rights within iTunes. When I connect a student to iTunes U, they're given that credential by default. I have similar credentials for Faculty and College (college being everyone who isn't a student or faculty member).

    If memory serves, iTunes U should automatically assign someone the "authenticated" role when they connect via your connection script, so if you setup content to be downloadable by "authenticated", then that should allow your students (and anyone else who properly authenticates) into the site. That allows for a quick and dirty separation of public vs. college content without mucking around with specific faculty/student/staff roles. If you want to go further, and restrict access to specific sections our courses, then you'll definitely want those sorts of focused roles, and make use of the ${IDENTIFIER} technique described in the access control documentation.

    Ken Newquist
    Lafayette College
    MacBook Pro, Mac OS X (10.4.8)
  • Duncan Bernhardt Level 3 Level 3 (870 points)
    I believe this problem can be solved by creating a credential in iTunes U as an admin with the exact credential you are creating.

    When logged in to your site as an Admin, click on the Edit Access page and add a credential with "" as the name. This should authenticate the user correctly since that credential now exists on your iTunes U site.

    If you create a class in iTunes U with an identifier with the exact string "uniquename_fromitunes," the credential should also validate correctly, even if that exact credential is not in the list of approved credentials.

    I hope this helps.
    Mac OS X (10.4.10)
  • donlaur Calculating status...
    Is there any way to get a copy of the authenicated script using PHP to connect to the LDAP-AD and login to iTunes U. I have one script I have used for connecting to AD for a while but it messes up from time to time when different colleges use different groups. I have a simple login script too but it would be helpful to get it all in one.

    All Kinds, Mac OS X (10.5.1)


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.