#NEWLINE# def __init__( self , request_validator , token_generator = None , token_expires_in = None , **kwargs ) : #NEWLINE# #INDENT# 'Construct a new web application server.\n\n        :param request_validator: An implementation of oauthlib.oauth2.RequestValidator.\n        :param token_generator: A function to generate a token from a request.\n        :param kwargs: Extra parameters to pass to authorization endpoint,\n                       token endpoint and resource endpoint constructors.\n        ' #NEWLINE# auth_grant = AuthorizationCodeGrant ( request_validator ) #NEWLINE# refresh_grant = RefreshTokenGrant ( request_validator ) #NEWLINE# bearer = BearerToken ( request_validator , token_generator , expires_in = token_expires_in ) #NEWLINE# AuthorizationEndpoint . __init__ ( self , default_response_type = 'code' , response_types = { #NEWLINE# #INDENT# 'code' : auth_grant , #NEWLINE# #UNINDENT# } , default_token_type = bearer ) #NEWLINE# TokenEndpoint . __init__ ( self , default_grant_type = 'authorization_code' , grant_types = { #NEWLINE# #INDENT# 'authorization_code' : auth_grant , #NEWLINE# 'refresh_token' : refresh_grant , #NEWLINE# #UNINDENT# } , default_token_type = bearer ) #NEWLINE# ResourceEndpoint . __init__ ( bearer , default_token = 'Bearer' , token_types = { #NEWLINE# #INDENT# 'Bearer' : bearer , #NEWLINE# #UNINDENT# } )