app/controllers/logins_controller.rb
##Reauthenticate and set new scoped token
Reauthenticate and set new scoped token
Reauthenticate and set new scoped token
def switch
    identity = Ropenstack::Identity.new(APP_CONFIG["identity"]["ip"], APP_CONFIG["identity"]["port"], (sesh :current_token), "identityv2")
    identity.scope_token(params[:tenant_name])
    store_services(identity.services(), identity.admin())	
    sesh :current_tenant, identity.token_metadata()["tenant"]["id"]
    sesh :current_tenant_name, identity.token_metadata()["tenant"]["name"]
    sesh :current_token, identity.token()
    redirect_to visualisation_url
  end
def switch identity = Ropenstack :: Identity . new ( APP_CONFIG [ "identity" ] [ "ip" ] , APP_CONFIG [ "identity" ] [ "port" ] , ( sesh :current_token ) , "identityv2" ) identity . scope_token ( params [ :tenant_name ] ) store_services ( identity . services ( ) , identity . admin ( ) ) sesh :current_tenant , identity . token_metadata ( ) [ "tenant" ] [ "id" ] sesh :current_tenant_name , identity . token_metadata ( ) [ "tenant" ] [ "name" ] sesh :current_token , identity . token ( ) redirect_to visualisation_url end
Reauthenticate and set new scoped token
Reauthenticate and set new scoped token