Skip to content

Commit

Permalink
Merge pull request #134 from Kuadrant/fix-auth-timestamp
Browse files Browse the repository at this point in the history
Fix auth timestamp
  • Loading branch information
adam-cattermole authored Nov 7, 2024
2 parents dddda54 + 6cc5638 commit e749b3f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/service/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::envoy::{
};
use crate::service::grpc_message::{GrpcMessageResponse, GrpcMessageResult};
use crate::service::GrpcService;
use chrono::{DateTime, FixedOffset, Timelike};
use chrono::{DateTime, FixedOffset};
use log::{debug, warn};
use protobuf::well_known_types::Timestamp;
use protobuf::Message;
Expand Down Expand Up @@ -100,8 +100,8 @@ impl AuthService {
.expect("Error!")
.map_or(Timestamp::new(), |date_time: DateTime<FixedOffset>| {
Timestamp {
nanos: date_time.nanosecond() as i32,
seconds: date_time.second() as i64,
nanos: date_time.timestamp_subsec_nanos() as i32,
seconds: date_time.timestamp(),
unknown_fields: Default::default(),
cached_size: Default::default(),
}
Expand Down
2 changes: 1 addition & 1 deletion utils/deploy/authconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: authorino.kuadrant.io/v1beta2
apiVersion: authorino.kuadrant.io/v1beta3
kind: AuthConfig
metadata:
name: talker-api-protection
Expand Down
4 changes: 2 additions & 2 deletions utils/deploy/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data:
- endpoint:
address:
socket_address:
address: sample-authorino-authorization
address: authorino-authorino-authorization
port_value: 50051
- name: limitador
connect_timeout: 1s
Expand All @@ -42,7 +42,7 @@ data:
- endpoint:
address:
socket_address:
address: limitador-sample
address: limitador-limitador
port_value: 8081
- name: talker-api
connect_timeout: 0.25s
Expand Down
2 changes: 1 addition & 1 deletion utils/kustomize/authorino/authorino.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: operator.authorino.kuadrant.io/v1beta1
kind: Authorino
metadata:
name: sample
name: authorino
spec:
clusterWide: true
authConfigLabelSelectors: ""
Expand Down
2 changes: 1 addition & 1 deletion utils/kustomize/limitador/limitador.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: limitador.kuadrant.io/v1alpha1
kind: Limitador
metadata:
name: sample
name: limitador
spec:
verbosity: 3
listener:
Expand Down

0 comments on commit e749b3f

Please sign in to comment.