class OAuth

Public Class Methods

new() click to toggle source
# File lib/oauth/oauth.rb, line 6
def initialize
  access_token_url = java.net.URI.new("https://token.services.auth.zalando.com/oauth2/access_token?realm=/services")
  token_info_url = java.net.URI.new("https://info.services.auth.zalando.com/oauth2/tokeninfo")
  manager_builder = org.zalando.stups.tokens.Tokens.createAccessTokensWithUri(access_token_url).tokenInfoUri(token_info_url)
  manager_builder.manageToken("nakadi").done
  @manager = manager_builder.start
end

Public Instance Methods

stop() click to toggle source
# File lib/oauth/oauth.rb, line 14
def stop
  @manager.stop
end
token() click to toggle source
# File lib/oauth/oauth.rb, line 18
def token
  @manager.get("nakadi")
end