#NEWLINE# @ cached_property #NEWLINE# def server( self ) : #NEWLINE# #INDENT# '\n        All in one endpoints. This property is created automatically\n        if you have implemented all the getters and setters.\n\n        However, if you are not satisfied with the getter and setter,\n        you can create a validator with :class:`OAuth2RequestValidator`::\n\n            class MyValidator(OAuth2RequestValidator):\n                def validate_client_id(self, client_id):\n                    # do something\n                    return True\n\n        And assign the validator for the provider::\n\n            oauth._validator = MyValidator()\n        ' #NEWLINE# expires_in = self . app . config . get ( 'OAUTH2_PROVIDER_TOKEN_EXPIRES_IN' ) #NEWLINE# token_generator = self . app . config . get ( 'OAUTH2_PROVIDER_TOKEN_GENERATOR' , None ) #NEWLINE# if ( token_generator and ( not callable ( token_generator ) ) ) : #NEWLINE# #INDENT# token_generator = import_string ( self ) #NEWLINE# #UNINDENT# refresh_token_generator = self . app . config . get ( 'OAUTH2_PROVIDER_REFRESH_TOKEN_GENERATOR' , None ) #NEWLINE# if ( refresh_token_generator and ( not callable ( refresh_token_generator ) ) ) : #NEWLINE# #INDENT# refresh_token_generator = import_string ( refresh_token_generator ) #NEWLINE# #UNINDENT# if hasattr ( self , '_validator' ) : #NEWLINE# #INDENT# return Server ( self . _validator , token_expires_in = expires_in , token_generator = token_generator , refresh_token_generator = refresh_token_generator ) #NEWLINE# #UNINDENT# if ( hasattr ( self , '_clientgetter' ) and hasattr ( self , '_tokengetter' ) and hasattr ( self , '_tokensetter' ) and hasattr ( self , '_grantgetter' ) and hasattr ( self , '_grantsetter' ) ) : #NEWLINE# #INDENT# usergetter = None #NEWLINE# if hasattr ( self , '_usergetter' ) : #NEWLINE# #INDENT# usergetter = self . _usergetter #NEWLINE# #UNINDENT# validator = OAuth2RequestValidator ( clientgetter = self . _clientgetter , tokengetter = self . _tokengetter , grantgetter = self . _grantgetter , usergetter = usergetter , tokensetter = self . _tokensetter , grantsetter = self . _grantsetter ) #NEWLINE# self . _validator = validator #NEWLINE# return Server ( validator , token_expires_in = expires_in , token_generator = token_generator , refresh_token_generator = refresh_token_generator ) #NEWLINE# #UNINDENT# raise RuntimeError ( 'application not bound to required getters' )