config = {
environment: ENV.fetch(‘MEMBERSHIP_GEM_ENV‘, ‘dev‘),
apikey: ENV.fetch(‘MEMBERSHIP_GEM_APIKEY‘),
application_name: ENV.fetch(‘MEMBERSHIP_GEM_APP_NAME‘),
}
$membership = XO::Membership.client(config)
def membership
$membership
end
def token
request.cookies[ENV[‘COOKIE_NAME‘]]
end
def require_current_member
head(:unauthorized) if current_member.nil?
end
def current_member
@current_member ||= (membership.get(token) if token)
@current_member
end
AS_DAEMON=false
PORT=5555
MASHERY_KEY=2fpg4bs2ungxkjm9eprep5k4j38zwdhtyh5
SNS_SECRET_ACCESS_KEY=jIhNCpz4Tkej3HKhlVDLIX3TAcW3Qnw3dewHGjIW
S3_SECRET_ACCESS_KEY=pokkcs4oOelphjAlhBkML2SWToGvMz5wpQwQL1us
HONEYBADGER_API_KEY=9f0d1178
COOKIE_NAME=STATICAUTHTIX
API_ADMIN_USER=guestservices
API_ADMIN_PASSWORD=!q2w3e4r
OMNIAUTH_FACEBOOK_KEY=179731445796
OMNIAUTH_FACEBOOK_SECRET=7699663474bf5f2b0976df66a336ab6f
GOOGLE_CLIENT_ID=14958540551.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=6gM32FhxHJq8soaZlK_3zAIm
INSTAGRAM_CLIENT_ID=f0e336a4e4d04f42a2ed923c4e00cf32
INSTAGRAM_CLIENT_SECRET=ea9c0b28c08a4c459107c865a1a49f6d
MEMBERSHIP_GEM_HMAC_KEY=KLASJDFLU3487ERHJ89GY24JIOPQFJC7903490V3490VMHGJ0DKXW30HGC290CY5
MEMBERSHIP_GEM_KEY_192="222,66,219,118,44,135,72,102"
MEMBERSHIP_GEM_IV_192="33,54,108,155,204,222,49,118"
MEMBERSHIP_GEM_ENV=‘qa‘
MEMBERSHIP_GEM_APIKEY=‘2fpg4bs2ungxkjm9eprep5k4j38zwdhtyh5‘
MEMBERSHIP_GEM_APP_NAME=‘MembershipGemDemo‘