@prefix oauth:   <http://demiblog.org/vocab/oauth#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix vann:    <http://purl.org/vocab/vann/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix foaf:    <http://xmlns.com/foaf/0.1/> .

oauth:
	rdf:type owl:Ontology ;
	rdfs:label "OAuth Vocabulary"@en ;
	vann:preferredNamespaceURI oauth: ;
	vann:preferredNamespacePrefix "oauth" ;
	dcterms:creator <http://tobyinkster.co.uk/#i> ;
	rdfs:seeAlso <http://demiblog.org/vocab/oauth-example> .

oauth:Consumer
	rdf:type rdfs:Class ;
	rdfs:subClassOf foaf:Agent ;
	rdfs:label "Consumer"@en ;
	rdfs:comment "Represents a registered OAuth Consumer"@en ;
	rdfs:isDefinedBy oauth: .

oauth:Token
	rdf:type rdfs:Class ;
	rdfs:label "Token"@en ;
	rdfs:comment "An abstract class. Do not use directly."@en ;
	rdfs:isDefinedBy oauth: .

oauth:RequestToken
	rdf:type rdfs:Class ;
	rdfs:subClassOf oauth:Token ;
	rdfs:label "Request Token"@en ;
	rdfs:comment "Represents a (authorized or not) OAuth Request Token."@en ;
	rdfs:isDefinedBy oauth: .

oauth:AccessToken
	rdf:type rdfs:Class ;
	rdfs:subClassOf oauth:Token ;
	rdfs:label "Access Token"@en ;
	rdfs:comment "Represents an OAuth Access Token that has been obtained by a Consumer subsequent to a Request Token"@en ;
	rdfs:isDefinedBy oauth: .

oauth:Secret
	rdf:type rdfs:Class ;
	rdfs:label "Secret"@en ;
	rdfs:comment "Logically a placeholder for a string literal, but using a resource instead allows us to make it the subject of triples. Especially of the form: <secret> oauth:encrypted 'blah'."@en ;
	rdfs:isDefinedBy oauth: .

oauth:consumer_secret
	rdf:type rdf:Property ;
	rdfs:label "consumer secret"@en ;
	rdfs:comment "A secret known only to the OAuth Consumer and Service Provider."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:Consumer ;
	rdfs:range oauth:Secret .

oauth:consumer_contact
	rdf:type rdf:Property ;
	rdfs:label "consumer contact"@en ;
	rdfs:comment "A contact point for the OAuth Consumer."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:Consumer ;
	rdfs:range foaf:Agent .

oauth:encrypted
	rdf:type rdf:Property ;
	rdfs:label "encrypted"@en ;
	rdfs:comment "The encrypted form of a Secret. The standard method is to use the Rijndael algorithm in CBC mode, with a 256-bit key known to the service provider, and no initialisation vector."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:Secret ;
	rdfs:range <http://www.w3.org/2000/01/rdf-schema#Literal> .

oauth:plaintext
	rdf:type rdf:Property ;
	rdfs:subPropertyOf rdf:value ;
	rdfs:label "plaintext"@en ;
	rdfs:comment "The plain (unencrypted) text form of a Secret."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:Secret ;
	rdfs:range <http://www.w3.org/2000/01/rdf-schema#Literal> .

oauth:consumer
	rdf:type rdf:Property ;
	rdfs:label "consumer"@en ;
	rdfs:comment "The Consumer responsible for this OAuth Token having been created."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:Token ;
	rdfs:range oauth:Consumer .

oauth:callback
	rdf:type rdf:Property ;
	rdfs:label "callback"@en ;
	rdfs:comment "A callback URL associated with an OAuth Request Token."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:RequestToken ;
	rdfs:range <http://www.w3.org/2000/01/rdf-schema#Resource> .

oauth:timestamp
	rdf:type rdf:Property ;
	rdfs:label "timestamp"@en ;
	rdfs:comment "The timestamp provided by the Consumer when creating this OAuth Token."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:Token ;
	rdfs:range <http://www.w3.org/2000/01/rdf-schema#Literal> ;
	rdfs:subPropertyOf dcterms:date .

oauth:nonce
	rdf:type rdf:Property ;
	rdfs:label "nonce"@en ;
	rdfs:comment "The nonce provided by the Consumer when creating this OAuth Token."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:Token ;
	rdfs:range <http://www.w3.org/2000/01/rdf-schema#Literal> .

oauth:token_secret
	rdf:type rdf:Property ;
	rdfs:label "token secret"@en ;
	rdfs:comment "A secret string associated with an OAuth Token."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:Token ;
	rdfs:range oauth:Secret .

oauth:granted_by
	rdf:type rdf:Property ;
	rdfs:label "granted by"@en ;
	rdfs:comment "The foaf:OnlineAccount used to authorize an OAuth Request Token."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:RequestToken ;
	rdfs:range foaf:OnlineAccount .

oauth:granted_at
	rdf:type rdf:Property ;
	rdfs:label "granted at"@en ;
	rdfs:comment "The datetime an OAuth Request Token was authorized."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:RequestToken ;
	rdfs:range <http://www.w3.org/2000/01/rdf-schema#Literal> .

oauth:granted_until
	rdf:type rdf:Property ;
	rdfs:label "granted until"@en ;
	rdfs:comment "The datetime an OAuth Request Token is considered authorized until."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:RequestToken ;
	rdfs:range <http://www.w3.org/2000/01/rdf-schema#Literal> .

oauth:verification_code
	rdf:type rdf:Property ;
	rdfs:label "verification code"@en ;
	rdfs:comment "The secret code associated with an OAuth Request Token when authorizing it."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:RequestToken ;
	rdfs:range oauth:Secret .

oauth:request_token
	rdf:type rdf:Property ;
	rdfs:label "request token"@en ;
	rdfs:comment "Indicates the OAuth Request Token that authorized the issuing of this Access Token."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:AccessToken ;
	rdfs:range oauth:RequestToken .

oauth:access_as
	rdf:type rdf:Property ;
	rdfs:label "access as"@en ;
	rdfs:comment "The foaf:OnlineAccount that this OAuth Access Token provides access as."@en ;
	rdfs:isDefinedBy oauth: ;
	rdfs:domain oauth:AccessToken ;
	rdfs:range foaf:OnlineAccount .
