Ok, as I just have fixed my SMF OpenID endpoint implementation (read details about some very related problems I had here) where I made a few assumptions on those relations. Of course that doesn't prove them right (so please correct me). Here they are:
Identifier URL = OpenID endpoint URL = IdP
The OpenID endpoint is not unique. It is the same for all end users of that endpoint.
Verified identifier URL = identity
Verified identifier URL is unique. It is associated to the endpoint user account.
https://www.google.com/accounts/o8/idis the Google OpenID endpoint URL.https://www.google.com/accounts/o8/id?id=AltOawk...is the Google OpenID verified identifier URL.The hash the Google OpenID identity URL contains is also related to the OpenID realm (the consumer domain namespace where this OpenID identifier stays valid). That is one of the reasons to not be just the username.
About how to provide the unique verified identifier URL, see here.
Still some things remain unclear to me:
What other reasons are there that Google uses for the hashed id; it could have also used
id?u={username}&oidrealm={...}.What is the reason to have such OpenID realm at all?
What exactly is the difference between identifier URL and claimed identifier URL?
Ok, as I just have fixed my SMF OpenID endpoint implementation (read details about some very related problems I had here) where I made a few assumptions on those relations. Of course that doesn't prove them right (so please correct me). Here they are:
Identifier URL = OpenID endpoint URL = IdP
The OpenID endpoint is not unique. It is the same for all end users of that endpoint.
Verified identifier URL = identity
Verified identifier URL is unique. It is associated to the endpoint user account.
https://www.google.com/accounts/o8/idis the Google OpenID endpoint URL.https://www.google.com/accounts/o8/id?id=AltOawk...is the Google OpenID verified identifier URL.The hash the Google OpenID identity URL contains is also related to the OpenID realm (the consumer domain namespace where this OpenID identifier stays valid). That is one of the reasons to not be just the username.
About how to provide the unique verified identifier URL, see here.
Still some things remain unclear to me:
What other reasons are there that Google uses for the hashed id; it could have also used
id?u={username}&oidrealm={...}.What is the reason to have such OpenID realm at all?
What exactly is the difference between identifier URL and claimed identifier URL?
Here is my understanding. I am actually just answering the last two questions in your own answer. Hope someone finds these useful.
What is the reason to have such OpenID realm at all?
The realm is used for security. Basically the return_url is checked against the realm, and OpenID specs say they MUST match. Google has taken this one step further, and provides unique verified identifiers for each realm. They might have done as you suggested, and put the realm back in their identifier, but then you could tell by looking at two verified identifiers whether they were the same end-user or not. I think they are trying to keep their identifiers free of identifying information. (ironic, no?)
What exactly is the difference between identifier URL and claimed identifier URL?
The claimed identifier is the one the end-user has specified. This is not their unique identifier. Yahoo is a good example of this. They allow you to specify yahoo.com as your identifier, log into your yahoo account, and return a unique identifier to the openid consumer. This just simplifies the process for the end-user. (And increases the likelihood that they'll use yahoo.com as their openid!)
If you consider that a UUID is essentially just a 128 bits, usually displayed in hex, you can actually convert it quite easily from hex (base16) to a url friendly variant of base64 (e.g. this), making it about 1/4 of the size, but containing the same value. There's some good examples on here for converting regular base64 to a URL friendly variant, just be sure to decode the UUID hex first (or don't! it'll just end up being base64 encoded ascii instead).
Because of this, the url I will generate for the item is gonna be something like '/item/4020fd9e-8655-4c2b-93d0-c283210753d9', which looks ridiculous and is way too long.
Looks ridiculous
Assuming you are writing an api here, No-one will ever see the urls
Way too long
The max length of a url differs between browsers, but we are talking 2000 characters. Your url is not too long.
The major benefit with a UUID/GUID is that any computer can generate one without having to check to see if its already been used.
In practice this means that a client of your API can create a new Item with an ID, manipulate it, join it to other things etc etc and when its ready, POST it to your API to be saved without having to worry that the ID has already been used.
this is call seo url you can see some samples here http://davidwalsh.name/htaccess-url
You are right, that is how it is done, and the string is indentifier here. Also workaround here would be ENUM of all identifiers but lets not go too deep into it.
It seems not efficient way for you, I see your point, but hey this action is only ~0,01sec slower and gives you a lot of advance on SEO because you have clean url, so nothing too bad there...