@@ -50,7 +50,7 @@ async def get_rs256_token(
5050 try :
5151 private_key = get_private_key (env )
5252 except OpenSPPOAuthJWTException as e :
53- _logger .warning ("RS256 token generation failed : RSA keys not configured" )
53+ _logger .warning ("RS256 signing unavailable : RSA keys not configured" )
5454 raise HTTPException (
5555 status_code = status .HTTP_400_BAD_REQUEST ,
5656 detail = (
@@ -76,15 +76,15 @@ async def get_rs256_token(
7676 config_param .get_param ("spp_api_v2.token_lifetime_hours" , str (DEFAULT_TOKEN_LIFETIME_HOURS ))
7777 )
7878 except (ValueError , TypeError ):
79- _logger .warning ("Invalid token_lifetime_hours config, using default %s" , DEFAULT_TOKEN_LIFETIME_HOURS )
79+ _logger .warning ("Invalid lifetime_hours config value , using default %s" , DEFAULT_TOKEN_LIFETIME_HOURS )
8080 token_lifetime_hours = DEFAULT_TOKEN_LIFETIME_HOURS
8181 expires_in = token_lifetime_hours * 3600
8282
8383 # Generate RS256 JWT token
8484 try :
8585 token = _generate_rs256_jwt_token (private_key , api_client , token_lifetime_hours )
8686 except (ValueError , TypeError , pyjwt .PyJWTError ) as e :
87- _logger .exception ("Error generating RS256 JWT token " )
87+ _logger .exception ("Error generating RS256 JWT" )
8888 raise HTTPException (
8989 status_code = status .HTTP_500_INTERNAL_SERVER_ERROR ,
9090 detail = "Failed to generate access token" ,
@@ -122,6 +122,6 @@ def _generate_rs256_jwt_token(private_key: str, api_client, token_lifetime_hours
122122
123123 token = pyjwt .encode (payload , private_key , algorithm = "RS256" )
124124
125- _logger .info ("Generated RS256 JWT token for client: %s" , api_client .client_id )
125+ _logger .info ("Generated RS256 JWT for client: %s" , api_client .client_id )
126126
127127 return token
0 commit comments