Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
require 'base64'
module BasicAuth
def self.encode(username, password)
s = [username, password].join(":")
"Basic #{Base64.strict_encode64 s}"
end
def self.decode(header)
base64 = header[/Basic (.*)/, 1]
Base64.decode64 base64.split(":")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.