def METHOD_NAME(self, auth_method, validate_jti=True):
    server = create_authorization_server(self.app)
    server.register_grant(JWTClientCredentialsGrant)
    server.register_client_auth_method(
        JWTClientAuth.CLIENT_AUTH_METHOD,
        JWTClientAuth('https://localhost/oauth/token', validate_jti)
    )
    user = User(username='foo')
    db.session.add(user)
    db.session.commit()
    client = Client(
        user_id=user.id,
        client_id='credential-client',
        client_secret='credential-secret',
    )
    client.set_client_metadata({
        'scope': 'profile',
        'redirect_uris': ['http://localhost/authorized'],
        'grant_types': ['client_credentials'],
        'token_endpoint_auth_method': auth_method,
    })
    db.session.add(client)
    db.session.commit()