module WineBouncer::AuthMethods
Public Instance Methods
client_credential_token?()
click to toggle source
# File lib/wine_bouncer/auth_methods/auth_methods.rb, line 18 def client_credential_token? has_doorkeeper_token? && doorkeeper_access_token.resource_owner_id.nil? end
doorkeeper_access_token()
click to toggle source
# File lib/wine_bouncer/auth_methods/auth_methods.rb, line 22 def doorkeeper_access_token @_doorkeeper_access_token end
doorkeeper_access_token=(token)
click to toggle source
# File lib/wine_bouncer/auth_methods/auth_methods.rb, line 26 def doorkeeper_access_token=(token) @_doorkeeper_access_token = token end
has_doorkeeper_token?()
click to toggle source
# File lib/wine_bouncer/auth_methods/auth_methods.rb, line 30 def has_doorkeeper_token? !@_doorkeeper_access_token.nil? end
has_resource_owner?()
click to toggle source
# File lib/wine_bouncer/auth_methods/auth_methods.rb, line 34 def has_resource_owner? has_doorkeeper_token? && !!doorkeeper_access_token.resource_owner_id end
protected_endpoint=(protected)
click to toggle source
# File lib/wine_bouncer/auth_methods/auth_methods.rb, line 6 def protected_endpoint=(protected) @protected_endpoint = protected end
protected_endpoint?()
click to toggle source
# File lib/wine_bouncer/auth_methods/auth_methods.rb, line 10 def protected_endpoint? @protected_endpoint || false end
resource_owner()
click to toggle source
# File lib/wine_bouncer/auth_methods/auth_methods.rb, line 14 def resource_owner instance_eval(&WineBouncer.configuration.defined_resource_owner) end