Sha256: 8ffda244c1cd103dd24882d3a709457ef45680fc5bafc2d29de3ee268e873baf
Contents?: true
Size: 618 Bytes
Versions: 3
Compression:
Stored size: 618 Bytes
Contents
require "tamashii/manager/errors/authorization_error" require "tamashii/manager/authorizator/token" require "tamashii/common" module Tamashii module Manager class Authorization < Tamashii::Handler def resolve(data = nil) type, client_id = case @type when Tamashii::Type::AUTH_TOKEN Authorizator::Token.new.verify!(data) else raise AuthorizationError.new("Invalid authorization type.") end @env[:client].accept(type, client_id) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tamashii-manager-0.1.7 | lib/tamashii/manager/authorization.rb |
tamashii-manager-0.1.5 | lib/tamashii/manager/authorization.rb |
tamashii-manager-0.1.4 | lib/tamashii/manager/authorization.rb |