(*, private_key: str, app_identifier: str)
return jwt.encode(payload=payload, key=private_key, algorithm="RS256").decode()
Create an authentication token to make application requests.
    https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app

    This is different from authenticating as an installation
Create an authentication token to make application requests.
    https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app
Create an authentication token to make application requests . https : // developer . github . com / apps / building - github - apps / authenticating - with - github - apps / #authenticating - as - a - github - app
def generate_jwt(*, private_key: str, app_identifier: str) -> str:
    """
    Create an authentication token to make application requests.
    https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app

    This is different from authenticating as an installation
    """
    issued_at = int(datetime.now().timestamp())
    expiration = int((datetime.now() + timedelta(minutes=9, seconds=30)).timestamp())
    payload = dict(iat=issued_at, exp=expiration, iss=app_identifier)
    return jwt.encode(payload=payload, key=private_key, algorithm="RS256").decode()
def generate_jwt ( * , private_key : str , app_identifier : str ) -> str : issued_at = int ( datetime . now ( ) . timestamp ( ) ) expiration = int ( ( datetime . now ( ) + timedelta ( minutes = 9 , seconds = 30 ) ) . timestamp ( ) ) payload = dict ( iat = issued_at , exp = expiration , iss = app_identifier ) return jwt . encode ( payload = payload , key = private_key , algorithm = "RS256" ) . decode ( )