lib/hiptail/manager.rb
# A new instance of HipTail::Manager.
# @param [Hash] params ({})
# @option params [HipTail::AuthorityProvider] :authority_provider (new instance of HipTail::MemoryAuthorityProvider)
# @return [HipTail::Manager]
A new instance of HipTail::Manager.
A new instance of HipTail :: Manager .
def build_authority(params)
      server_cap = JSON.parse(URI.parse(params['capabilitiesUrl']).read)
      oauth2_info = server_cap['capabilities']['oauth2Provider']
      api_base    = server_cap['links']['api']
      HipTail::Authority.new(
        :oauth_id          => params['oauthId'],
        :oauth_secret      => params['oauthSecret'],
        :room_id           => params['roomId'],
        :group_id          => params['groupId'],
        :authorization_url => oauth2_info['authorizationUrl'],
        :token_url         => oauth2_info['tokenUrl'],
        :api_base          => server_cap['links']['api'],
      )
    end
def build_authority ( params ) server_cap = JSON . parse ( URI . parse ( params [ 'capabilitiesUrl' ] ) . read ) oauth2_info = server_cap [ 'capabilities' ] [ 'oauth2Provider' ] api_base = server_cap [ 'links' ] [ 'api' ] HipTail :: Authority . new ( :oauth_id => params [ 'oauthId' ] , :oauth_secret => params [ 'oauthSecret' ] , :room_id => params [ 'roomId' ] , :group_id => params [ 'groupId' ] , :authorization_url => oauth2_info [ 'authorizationUrl' ] , :token_url => oauth2_info [ 'tokenUrl' ] , :api_base => server_cap [ 'links' ] [ 'api' ] , ) end
A new instance of HipTail::Manager.
A new instance of HipTail :: Manager .
None
HipTail::Manager
params
:authority_provider (new instance of HipTail::MemoryAuthorityProvider)
: authority_provider ( new instance of HipTail :: MemoryAuthorityProvider )
<not_specific>
None