Commit 1872859d authored by Rémy Coutable's avatar Rémy Coutable

Don't declare constants in Struct

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent a69aa3da
AccessTokenValidationService = Struct.new(:token) do
class AccessTokenValidationService
# Results:
VALID = :valid
EXPIRED = :expired
REVOKED = :revoked
INSUFFICIENT_SCOPE = :insufficient_scope
attr_reader :token
def initialize(token)
@token = token
end
def validate(scopes: [])
if token.expired?
return EXPIRED
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment