cloud_controller/app/models/user_token.rb
# Return a UserToken from an encoded string
Return a UserToken from an encoded string
Return a UserToken from an encoded string
def decode(string)
      user_name, time, decoded_hmac = Marshal.load([string].pack('H*'))
      token = UserToken.new(user_name, time)
      token.decoded_hmac = decoded_hmac.to_s
      token
    rescue
      raise DecodeError, "Invalid UserToken data"
    end
def decode ( string ) user_name , time , decoded_hmac = Marshal . load ( [ string ] . pack ( 'H*' ) ) token = UserToken . new ( user_name , time ) token . decoded_hmac = decoded_hmac . to_s token rescue raise DecodeError , "Invalid UserToken data" end
Return a UserToken from an encoded string
Return a UserToken from an encoded string
string