/*!
 * Copyright 2013 Apereo Foundation (AF) Licensed under the
 * Educational Community License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License. You may
 * obtain a copy of the License at
 *
 *     http://opensource.org/licenses/ECL-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an "AS IS"
 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */


/**
 * A generic context object that represents a user execution context.
 *
 * @param  {Tenant}  tenant  The tenant of the current execution context
 * @param  {User}    user    The user associated to the current execution context
 */
var Context = module.exports.Context = function(tenant, user) {
    var that = {};

    /**
     * The tenant
     *
     * @return {Tenant} The tenant associated to the current context
     */
    that.tenant = function() {
        return tenant;
    };

    /**
     * The user
     *
     * @return {User} The user associated to the current context
     */
    that.user = function() {
        return user;
    };

    return that;
};
