'Constructor
@param channel: dict with Humanitarian.ID API credentials:
{id=clientID, secret=clientSecret}'

def __init__(self, channel):

    request = current.request
    settings = current.deployment_settings
    scope = 'profile'
    redirect_uri = ('%s/%s/default/humanitarian_id/login' % (settings.get_base_public_url(), request.application))
    OAuthAccount.__init__(self, client_id=channel['id'], client_secret=channel['secret'], auth_url=self.AUTH_URL, token_url=self.TOKEN_URL, scope=scope, response_type='code', redirect_uri=redirect_uri, state='humanitarian_id')
    self.graph = None
