Skip to content

added signature method for the secure mode#32

Merged
bartes merged 1 commit intomasterfrom
signature
Jul 19, 2017
Merged

added signature method for the secure mode#32
bartes merged 1 commit intomasterfrom
signature

Conversation

@bartes
Copy link
Copy Markdown
Contributor

@bartes bartes commented Jul 17, 2017

No description provided.

@bartes bartes requested review from brissmyr and nijikon July 18, 2017 23:39
@bartes bartes force-pushed the signature branch 3 times, most recently from 4f9560e to e7d2ceb Compare July 19, 2017 07:57
module Castle
module SecureMode
def self.signature(user_id)
OpenSSL::HMAC.hexdigest('sha256', Castle.config.api_secret, user_id)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will crash if user_id is an Integer. user_id.to_s would fix it.

@bartes bartes merged commit b018754 into master Jul 19, 2017
@bartes bartes deleted the signature branch July 19, 2017 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants