This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The idea here is that if any of the three tokens are not already | |
# set, then they should be generated. In order to generate one, it | |
# must be unique. | |
def generate_tokens! | |
[ :code, :access_token, :refresh_token ].each do |attr| | |
next if send(attr) | |
send "#{attr}=", tokenize(attr) | |
end | |
end |