diff --git a/config/openim-5c6c0-firebase-adminsdk-ppwol-8765884a78.json b/config/openim-5c6c0-firebase-adminsdk-ppwol-8765884a78.json deleted file mode 100644 index e6870bbc1..000000000 --- a/config/openim-5c6c0-firebase-adminsdk-ppwol-8765884a78.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "service_account", - "project_id": "openim-5c6c0", - "private_key_id": "8765884a7875fd3c0a73bbc1718bdaeca39fd609", - "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC90b1YDn14JsY8\nu5a0RIx7yAWmsn8JuoceVPvFzAv45iuU3MfsD51TKY+gjmydFAMpUuEQKYF2hXie\nJt5+EaBf/RWch2zmHK+husQVJpRvKmTNPjT/fT2FqneozriQZ7QedRiKhkv2lb9A\n3QFO3kmeAI7W4DR+22wadNKBX/REv+nZECz6uaPZ9cRvUYb8GCYkcteau62P0z4E\n3sOHe52Pix0OV06vI47PTNmbhZOozF0wdVfxOe5eE5kQ8VZq2oQ+6SHZwNhl+7py\nHAN8Cgq4JXGrjNdafku9UNuLpYLv3a7DejNe1R5tkITE2P01Us43T7HRuZ8W8mV0\nCl9DU+HfAgMBAAECggEAVxu4M3+6znekw1wmpaVLfsZk6YHCULmbpizDuZqQ5/Dg\nkRjcWhU0UmShN8IET/VOGhmhlOQnODe6CYG22s3F9ibTUxjGvbbuVl65+ybQOU+Q\nIKvqcFCN+hgnf30WL5aXjt6Xm4JTu94ufVqubf4OdIa3Bh6vmIOjUWTI8XwSQbWx\n8llfOL4ElMdmtxg0N5iDmkSXfTgZWfty861s76bqazD1cQhMOYPXPnGP78DKyOjH\nN6XchHDXm5I0eEIa+jACW0p6DMArdwREhVgfQotxzRfExXLUR5XxJnMNuA1IwnWF\nJRAg9cEUeIQoJY/kDuNQlxsS2Manb+3exNk52BlFAQKBgQDjo+tENZ3Ozt/JPtev\nOHolhkGCJNWMJPV6SVuBta1/u0/T8HKxkXdNOrooM+dsK5xk+V6Dp8wwrQiUSy/f\n6RVXUcTKTahlTNhwrxmRisJbeyEoX8tJGDVjwJba4sKdkfsWeh4IduyvwQnRCNn8\nmx9Pfp5EyCnWkpyJLvM7OykqXwKBgQDVd5qD88UOvV73xZUPzPlnNQHzBS+TgPlI\n3CLesi8i5I3zBHYS8ynCi0eNyaLqmtatVL6XhnUAWI/U9NKNmP3AH2pigBVIAjM8\nMmSO8iaYYQA3/TOlIsNE6yFjd3t54yFkQ7J6yLPRQWWKwE+3hQ3VZ5WmyM5jOh/s\nD+g5lOd4gQKBgQCH4qSg7eSKvCEID5ROi0cWuULHfldfNfy3B60xC5NK6TRozmKY\nrr3pgwH216zwfEP6XoVVz8dq0w+I/izQ22Ea47u2C49XEP0unseDgrIsS57qa+x8\ncJAGQMOMW8pSpv6cVz8wTFVTQMcsWb1ONgcFvA6b/mRDKvd4SGd3VwRmvwKBgD48\nP5VG5eXVOjHcrgfMR85aOvZCRcuoZ4VhgN0ScAGpRuVaIJ6HvF4Ww0bISbJCcGJa\nebKtpcDzEQQSWKyltR1lS1vqYcn7sjpTqtOuL6hvZ2Prczoq92lJcBOSyzIPETYt\nMoTvrNVOTq90QAmORik4qP3WP63YTWRCgv7+tbmBAoGALVYhJB3KDuOfn4gowiBL\neCCsW93VdLBmrR4PIZlaLLNZSUu3hmM+XNhKCLzMHMoTtptHKq5aQusDlefxhioS\nuWuUXqFyZRdjP81lLBMZQmh6j7kPLC/fWZdN5iBlZX2JTANaOQZHDy8KEHMYq6zf\nYzLbTvrNYxxKyb5q6IXrErk=\n-----END PRIVATE KEY-----\n", - "client_email": "firebase-adminsdk-ppwol@openim-5c6c0.iam.gserviceaccount.com", - "client_id": "117878683878601533433", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://oauth2.googleapis.com/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-ppwol%40openim-5c6c0.iam.gserviceaccount.com" -} diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 60bf1d8a5..8a94d73f2 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -150,7 +150,7 @@ func ParseToken(c *gin.Context) { if err := c.BindJSON(¶ms); err != nil { errMsg := " BindJSON failed " + err.Error() log.NewError("0", errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 200, "errMsg": errMsg}) + c.JSON(http.StatusOK, gin.H{"errCode": 1001, "errMsg": errMsg}) return } @@ -161,7 +161,7 @@ func ParseToken(c *gin.Context) { if !ok { errMsg := params.OperationID + " " + "GetUserIDFromTokenExpireTime failed " + errInfo + " token:" + c.Request.Header.Get("token") log.NewError(params.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 200, "errMsg": errMsg}) + c.JSON(http.StatusOK, gin.H{"errCode": 1001, "errMsg": errMsg}) return }