def course_discovery_api_client(user):
 scopes = ['email', 'profile']
 expires_in = settings.OAUTH_ID_TOKEN_EXPIRATION
 jwt = JwtBuilder(user).build_token(scopes, expires_in)
 return EdxRestApiClient(settings.COURSE_CATALOG_API_URL, jwt=jwt)

def course_discovery_api_client ( user ) : scopes = [ 'email' , 'profile' ] expires_in = settings . OAUTH_ID_TOKEN_EXPIRATION jwt = JwtBuilder ( user ) . build_token ( scopes , expires_in ) return EdxRestApiClient ( settings . COURSE_CATALOG_API_URL , jwt = jwt )
returns a course discovery api client setup with authentication for the specified user .