mirror of
https://github.com/openziti/ziti.git
synced 2026-09-22 10:33:40 +00:00
add expiresAt to ottca
This commit is contained in:
@@ -224,6 +224,7 @@ func MapIdentityToRestModel(ae *env.AppEnv, identity *model.Identity) (*rest_mod
|
||||
CaID: ca.Id,
|
||||
Jwt: entity.Jwt,
|
||||
Token: entity.Token,
|
||||
ExpiresAt: expiresAt,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -217,6 +217,10 @@ type IdentityEnrollmentsOttca struct {
|
||||
// ca Id
|
||||
CaID string `json:"caId,omitempty"`
|
||||
|
||||
// expires at
|
||||
// Format: date-time
|
||||
ExpiresAt strfmt.DateTime `json:"expiresAt,omitempty"`
|
||||
|
||||
// jwt
|
||||
Jwt string `json:"jwt,omitempty"`
|
||||
|
||||
@@ -232,6 +236,10 @@ func (m *IdentityEnrollmentsOttca) Validate(formats strfmt.Registry) error {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateExpiresAt(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
@@ -256,6 +264,19 @@ func (m *IdentityEnrollmentsOttca) validateCa(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IdentityEnrollmentsOttca) validateExpiresAt(formats strfmt.Registry) error {
|
||||
|
||||
if swag.IsZero(m.ExpiresAt) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := validate.FormatOf("ottca"+"."+"expiresAt", "body", "date-time", m.ExpiresAt.String(), formats); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IdentityEnrollmentsOttca) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
|
||||
@@ -6248,6 +6248,10 @@ func init() {
|
||||
"caId": {
|
||||
"type": "string"
|
||||
},
|
||||
"expiresAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"jwt": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -20135,6 +20139,10 @@ func init() {
|
||||
"caId": {
|
||||
"type": "string"
|
||||
},
|
||||
"expiresAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"jwt": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -21885,6 +21893,10 @@ func init() {
|
||||
"caId": {
|
||||
"type": "string"
|
||||
},
|
||||
"expiresAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"jwt": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -3782,6 +3782,9 @@ definitions:
|
||||
type: string
|
||||
ca:
|
||||
$ref: '#/definitions/entityRef'
|
||||
expiresAt:
|
||||
type: string
|
||||
format: date-time
|
||||
###################################################################
|
||||
# Authenticator
|
||||
##################################################################
|
||||
|
||||
Reference in New Issue
Block a user