aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/SignedIdentityDocument.java
blob: 8ab07d97e74f5fa0bfbb2c59c6c4c47f7a866f99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.athenz.identityprovider.api;

/**
 * A signed identity document.
 * @author bjorncs
 * @author mortent
 */
public interface SignedIdentityDocument {

    int LEGACY_DEFAULT_DOCUMENT_VERSION = 3;
    int DEFAULT_DOCUMENT_VERSION = 4;

    default boolean outdated() { return documentVersion() < LEGACY_DEFAULT_DOCUMENT_VERSION; }

    IdentityDocument identityDocument();
    String signature();
    int signingKeyVersion();
    int documentVersion();
}