Class ::xo::oauth::Credentials (public)
::xo::db::CrClass ::xo::oauth::Credentials
Defined in /var/www/openacs.org/packages/xooauth/tcl/oauth-procs.tcl
All credentials are unique only between a client-server pair, which is the reason to store the client and server id at this level.
- See Also:
- Testcases:
- No testcase defined.
Source code: namespace eval ::xo::oauth {} ::nsf::object::alloc ::xo::db::CrClass ::xo::oauth::Credentials {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :abstract_p f set :auto_save false array set :db_constraints {server_metadata_id {{references {cr_items(item_id) on delete cascade}} {references {cr_items(item_id) on delete cascade}}} client_metadata_id {{references {cr_items(item_id) on delete cascade}} {references {cr_items(item_id) on delete cascade}}}} array set :db_slot {creation_date ::xo::db::Object::slot::creation_date server_metadata_id ::xo::oauth::Credentials::slot::server_metadata_id creation_user ::xo::db::Object::slot::creation_user object_id ::xo::db::Object::slot::object_id description ::xo::db::CrItem::slot::description creation_ip ::xo::db::Object::slot::creation_ip text ::xo::db::CrItem::slot::text package_id ::xo::db::Object::slot::package_id object_title ::xo::db::Object::slot::object_title nls_language ::xo::db::CrItem::slot::nls_language security_inherit_p ::xo::db::Object::slot::security_inherit_p context_id ::xo::db::Object::slot::context_id name ::xo::db::CrItem::slot::name mime_type ::xo::db::CrItem::slot::mime_type credentials_id ::xo::oauth::Credentials::slot::credentials_id title ::xo::db::CrItem::slot::title identifier ::xo::oauth::Credentials::slot::identifier client_metadata_id ::xo::oauth::Credentials::slot::client_metadata_id item_id ::xo::db::CrItem::slot::item_id revision_id ::xo::db::CrItem::slot::revision_id modifying_user ::xo::db::Object::slot::modifying_user publish_date ::xo::db::CrItem::slot::publish_date last_modified ::xo::db::Object::slot::last_modified secret ::xo::oauth::Credentials::slot::secret modifying_ip ::xo::db::Object::slot::modifying_ip} set :folder_id -100 set :id_column credentials_id set :mime_type text/plain set :name_method {} set :non_cached_instance_var_patterns __* set :object_type ::xo::oauth::Credentials set :object_type_key 000000000000111100011100 set :pretty_name {OAuth Credentials} set :pretty_plural {OAuth Credentials} set :security_inherit_p t set :sql_package_name ::xo::oauth::Credentials set :storage_type text set :supertype content_revision set :table_name xooauth_credentials set :with_table true} ::xo::oauth::Credentials instproc update {} { ::xo::dc transaction { next :instvar object_id secret identifier client_metadata_id server_metadata_id ::xo::dc dml update_xooauth_credentials {update xooauth_credentials set secret = :secret,identifier = :identifier,client_metadata_id = :client_metadata_id,server_metadata_id = :server_metadata_id where credentials_id = :object_id } } } ::xo::oauth::Credentials instproc as_encoded_string {} { set oauth_token [::xo::oauth::utility urlencode ${:identifier}] set oauth_token_secret [::xo::oauth::utility urlencode ${:secret}] return "oauth_token=${oauth_token}&oauth_token_secret=${oauth_token_secret}" } ::xo::oauth::Credentials instparametercmd mime_type ::xo::oauth::Credentials instparametercmd secret ::xo::oauth::Credentials instparametercmd credentials_id ::xo::oauth::Credentials instparametercmd identifier ::xo::oauth::Credentials instparametercmd server_metadata_id ::xo::oauth::Credentials instparametercmd client_metadata_id ::nsf::relation::set ::xo::oauth::Credentials superclass ::xo::db::CrItem ::nx::slotObj -container slot ::xo::oauth::Credentials ::nsf::object::alloc ::xotcl::Attribute ::xo::oauth::Credentials::slot::mime_type {set :accessor public set :configurable true set :convert false set :default text/plain set :defaultmethods {} set :disposition alias set :domain ::xo::oauth::Credentials set :incremental false set :manager ::xo::oauth::Credentials::slot::mime_type set :methodname mime_type set :multiplicity 1..1 set :name mime_type set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init} ::nsf::object::alloc ::xo::db::Attribute ::xo::oauth::Credentials::slot::credentials_id {set :accessor public set :column_name credentials_id set :configurable true set :convert false set :create_acs_attribute false set :create_table_attribute true set :datatype integer set :defaultmethods {} set :disposition alias set :domain ::xo::oauth::Credentials set :incremental false set :manager ::xo::oauth::Credentials::slot::credentials_id set :max_n_values 1 set :methodname credentials_id set :min_n_values 1 set :multiplicity 1..1 set :name credentials_id set :per-object false set :position 0 set :pretty_name ID set :pretty_plural {} set :references {} set :required false set :sqltype integer set :trace none : init} ::nsf::object::alloc ::xo::db::CrAttribute ::xo::oauth::Credentials::slot::secret {set :accessor public set :column_name secret set :configurable true set :convert false set :create_acs_attribute true set :create_table_attribute true set :datatype text set :defaultmethods {} set :disposition alias set :domain ::xo::oauth::Credentials set :incremental false set :manager ::xo::oauth::Credentials::slot::secret set :max_n_values 1 set :methodname secret set :min_n_values 1 set :multiplicity 1..1 set :name secret set :per-object false set :position 0 set :pretty_name #xo.Credentials-secret# set :pretty_plural {} set :references {} set :required false set :sqltype text set :trace none : init} ::nsf::object::alloc ::xo::db::CrAttribute ::xo::oauth::Credentials::slot::client_metadata_id {set :accessor public set :column_name client_metadata_id set :configurable true set :convert false set :create_acs_attribute true set :create_table_attribute true set :datatype integer set :defaultmethods {} set :disposition alias set :domain ::xo::oauth::Credentials set :incremental false set :manager ::xo::oauth::Credentials::slot::client_metadata_id set :max_n_values 1 set :methodname client_metadata_id set :min_n_values 1 set :multiplicity 1..1 set :name client_metadata_id set :per-object false set :position 0 set :pretty_name #xo.Credentials-client_metadata_id# set :pretty_plural {} set :references {cr_items(item_id) on delete cascade} set :required false set :sqltype integer set :trace none : init} ::nsf::object::alloc ::xo::db::CrAttribute ::xo::oauth::Credentials::slot::server_metadata_id {set :accessor public set :column_name server_metadata_id set :configurable true set :convert false set :create_acs_attribute true set :create_table_attribute true set :datatype integer set :defaultmethods {} set :disposition alias set :domain ::xo::oauth::Credentials set :incremental false set :manager ::xo::oauth::Credentials::slot::server_metadata_id set :max_n_values 1 set :methodname server_metadata_id set :min_n_values 1 set :multiplicity 1..1 set :name server_metadata_id set :per-object false set :position 0 set :pretty_name #xo.Credentials-server_metadata_id# set :pretty_plural {} set :references {cr_items(item_id) on delete cascade} set :required false set :sqltype integer set :trace none : init} ::nsf::object::alloc ::xo::db::CrAttribute ::xo::oauth::Credentials::slot::identifier {set :accessor public set :column_name identifier set :configurable true set :convert false set :create_acs_attribute true set :create_table_attribute true set :datatype text set :defaultmethods {} set :disposition alias set :domain ::xo::oauth::Credentials set :incremental false set :manager ::xo::oauth::Credentials::slot::identifier set :max_n_values 1 set :methodname identifier set :min_n_values 1 set :multiplicity 1..1 set :name identifier set :per-object false set :position 0 set :pretty_name #xo.Credentials-identifier# set :pretty_plural {} set :references {} set :required false set :sqltype text set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle