티스토리 뷰

URL과 관련된 부가 서비스

지난글에서 소개한 XRDS 파일을 OpenID가 위임을 하기 위해 사용하는 구조체로 설명하였습니다. 사실 XRDS 파일의 원래 용도는 그것보다 훨씬 다양합니다.

이야기를 하기에 앞서, 서비스와 그 서비스를 수행하기 위한 URL에 대한 수요는 상당히 많습니다. 예를 들어,

  • RSS
    <link rel="alternate" type="application/rss+xml"
      title="..." href="..." />
  • Atom
    <link rel="alternate" type="application/atom+xml"
     title="..." href="..." />
  • FOAF
    <link rel="meta" type="application/rdf+xml"
      title="FOAF" href="..." />
  • Open Search
    <link rel="search" type="application/opensearchdescription+xml"
      title="..." href="..." />
  • 원격 블로깅 - MetaWeblog, Blogger API, MovableType API
    <link rel="EditURI" type="application/rsd+xml"
      title="RSD" href="..." />
  • 원격 블로깅 - Atom
    <link rel="service.post" type="application/atom+xml"
     title="..." href="..." />
이런 URL들은 모두 HTML 소스의 head 태그 내에 기술되어 있습니다.

Accept 헤더?

마음 같아서는 http://coolengineer.com/ 과 관련된 서비스를 HTTP 관점에서 이렇게 접근하면 좋겠습니다만, 하나의 URL이 URL로서의 역할이 아닌 상황이 되기 때문에 표준을 좋아하시는 분들의 반발이 있을 수 있습니다.
GET / HTTP/1.1
Host: coolengineer.com
Accept: application/rdf+xml
또는

GET / HTTP/1.1
Host: coolengineer.com
Accept: application/opensearchdescription+xml
wget 으로 --header="Accept: ..." 옵션을 주어 테스트 해보실수 있겠지만, 아무 일도 일어나지 않습니다. ;)

부가 서비스 URL 검출기: XRDS

XRDS는 이런 종류의 검출을 일반화 시킬 수 있는 프레임웍으로 승격할 가능성이 있습니다. 즉, 서비스 URL 검출 방식을 "Accept: application/xrds+xml"로 통합시킬 수 있는 것입니다.
wget --header="Accept: xrds+xml" http://coolengineer.com/
요거하나만 허용하고, 내려 받게 되는 xrds 안에 서비스의 타입만 잘 정의해 줌으로써, 다른 서비스 검출로도 사용할 수 있다는 것이지요.

예를 들면, (아래는 제 생각일 뿐 사실이 아닙니다.)
<XRDS xmlns="xri://$xrd*($v*2.0)">
<XRD>
    <Service priority="0">
        <Type>http://a9.com/-/spec/opensearch/1.1/</Type>
        <URI>http://coolengineer.com/opensearch</URI>
    </Service>
    <Service priority="0">
        <Type>http://xmlns.com/foaf/0.1/</Type>
        <URI>http://coolengineer.com/foaf</URI>
    </Service>
</XRD>
</XRDS>

<!-- This is just my thought. DO NOT USE IN REAL ENVIRONMENTS. -->

이런 식으로 Service 태그의 나열이 되지 않을까 싶습니다.

며칠전 3/26에 제안된 XRDS Simple을 보며, 좀 더 많은 서비스가 XRDS에 맞게 나오는 것도 생각해 봅니다.

참고:
  1. Really Simple Discovery - http://en.wikipedia.org/wiki/Really_Simple_Discovery
  2. XRDS Service Discovery - http://wiki.openid.net/XRD-based_Service_Discovery
  3. OAuth Discovery - http://wiki.oauth.net/Discovery
  4. OAuth Extension - http://iiw.idcommons.net/index.php/OAuth_Extensions


반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함