Skip to content

Commit

Permalink
Comentar AuthToken
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciopasquier committed Aug 5, 2016
1 parent 5be2718 commit aac563d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/auth_token.rb
Expand Up @@ -7,6 +7,8 @@ class AuthToken
def initialize(token)
# Primero intentar decodificar
decoded_token = self.class.decodificar(token)

# Si se pudo decodificar el token es válido y extraemos los datos
@valido = true
@claims = HashWithIndifferentAccess.new decoded_token.first
@headers = HashWithIndifferentAccess.new decoded_token.last
Expand Down

0 comments on commit aac563d

Please sign in to comment.