fixed client id #592
@@ -69,6 +69,7 @@ func hasGrantType(grants []string, target string) bool {
|
|||||||
|
|
||||||
func (pr *PublicRouter) validateClientIPPolicy(r *http.Request, clientID string, client *model.Client) http.HandlerFunc {
|
func (pr *PublicRouter) validateClientIPPolicy(r *http.Request, clientID string, client *model.Client) http.HandlerFunc {
|
||||||
if client == nil {
|
if client == nil {
|
||||||
|
pr.logger.Info("Client not found, rejecting authorization", zap.String("client_id", clientID))
|
||||||
return response.Unauthorized(pr.logger, pr.service, "client not found")
|
return response.Unauthorized(pr.logger, pr.service, "client not found")
|
||||||
}
|
}
|
||||||
clientIP := ipguard.ClientIP(r)
|
clientIP := ipguard.ClientIP(r)
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ func (b *NatsBroker) Publish(envelope me.Envelope) error {
|
|||||||
// Serialize the message
|
// Serialize the message
|
||||||
data, err := envelope.Serialize()
|
data, err := envelope.Serialize()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.logger.Error("Failed to serialize message", zap.Error(err), mzap.Envelope(envelope))
|
b.logger.Warn("Failed to serialize message", zap.Error(err), mzap.Envelope(envelope))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := b.nc.Publish(subject, data); err != nil {
|
if err := b.nc.Publish(subject, data); err != nil {
|
||||||
b.logger.Error("Error publishing message", zap.Error(err), mzap.Envelope(envelope))
|
b.logger.Warn("Error publishing message", zap.Error(err), mzap.Envelope(envelope))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import 'package:pshared/config/common.dart';
|
|||||||
|
|
||||||
|
|
||||||
class Constants extends CommonConstants {
|
class Constants extends CommonConstants {
|
||||||
static const String _clientIdMobile = 'com.profee.pay.mobile-3f9c3b76-2f89-4e9e-95a2-1a5b705b7a1d';
|
static const String _clientIdMobile = 'net.sendico.mobile-9c7e7c4b-6f1a-4b8e-9a2d-3e5f0c1a7d92';
|
||||||
|
|
||||||
static Locale get defaultLocale => CommonConstants.defaultLocale;
|
static Locale get defaultLocale => CommonConstants.defaultLocale;
|
||||||
static String get clientId => _clientIdMobile;
|
static String get clientId => _clientIdMobile;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ extension AppConfigExtension on AppConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Constants extends CommonConstants {
|
class Constants extends CommonConstants {
|
||||||
static const String _clientIdWeb = 'com.profee.pay.web-4b6e8a0f-9b5c-4f57-b3a6-3c456e9bb2cd';
|
static const String _clientIdWeb = 'net.sendico.web-3f9a2c6e-7b4d-4e8a-9c2a-1d5f6b8e0a11';
|
||||||
|
|
||||||
// Just re-expose these from CommonConstants:
|
// Just re-expose these from CommonConstants:
|
||||||
static Locale get defaultLocale => CommonConstants.defaultLocale;
|
static Locale get defaultLocale => CommonConstants.defaultLocale;
|
||||||
|
|||||||
Reference in New Issue
Block a user