def get_edxnotes_id_token(user):
 try:
  client = Client.objects.get(name=CLIENT_NAME)
 except Client.DoesNotExist:
  raise ImproperlyConfigured('OAuth2 Client with name [{}] does not exist.'.format(CLIENT_NAME))
 scopes = ['email', 'profile']
 expires_in = settings.OAUTH_ID_TOKEN_EXPIRATION
 jwt = JwtBuilder(user, secret=client.client_secret).build_token(scopes, expires_in, aud=client.client_id)
 return jwt

def get_edxnotes_id_token ( user ) : try : client = Client . objects . get ( name = CLIENT_NAME ) except Client . DoesNotExist : raise ImproperlyConfigured ( 'OAuth2 Client with name [{}] does not exist.' . format ( CLIENT_NAME ) ) scopes = [ 'email' , 'profile' ] expires_in = settings . OAUTH_ID_TOKEN_EXPIRATION jwt = JwtBuilder ( user , secret = client . client_secret ) . build_token ( scopes , expires_in , aud = client . client_id ) return jwt
returns generated id token for edxnotes .