Skip to content

Instantly share code, notes, and snippets.

@cash
Created December 20, 2011 18:15
Show Gist options
  • Save cash/1502592 to your computer and use it in GitHub Desktop.
Save cash/1502592 to your computer and use it in GitHub Desktop.
Elgg OAuth API Plugin
<?php
/**
* Elgg OAuth Consumer Class
*/
class ElggOAuthConsumer {
const ELGG_CLIENT_CONSUMER = 'client';
const ELGG_SERVER_CONSUMER = 'server';
/**
* Set the consumer type
*
* @param string $type Consumer type.
* @return void
*/
public function setConsumerType($type) {
}
/**
* Get the consumer type
*
* @return string
*/
public function getConsumerType() {
}
/**
* Set the consumer name
*
* @param string $name The human-readable name of the consumer
* @return void
*/
public function setName($name) {
}
/**
* Get the consumer name
*
* @return string
*/
public function getName() {
}
}
<?php
/**
* Elgg OAuth Token Class
*/
class ElggOAuthToken {
public function __construct() {
}
/**
* Get the token type ('access' or 'refresh')
*
* @return string
*/
public function getTokenType() {
}
/**
* Get the token
*
* @return string
*/
public function getToken() {
}
/**
* Set the token
*
* @param string $token The token value
*/
public function setToken($token) {
}
/**
* Get the token secret
*
* @return string
*/
public function getSecret() {
}
/**
* Set the token secret
*
* @param string $secret The token secret
*/
public function setSecret($secret) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment