blob: cd563a2d9551b7137e50a0a77bedc6944aab9f69 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.identity.tokens;
/// The maximum length of an account ID string, in bytes.
const uint32 MAX_ACCOUNT_ID_SIZE = 1024;
/// An identifier for the account that a token is issued against, as specified
/// by the authorization server. Account identifiers are guaranteed to be unique
/// within an auth provider type.
using AccountId = string:MAX_ACCOUNT_ID_SIZE;
/// The maximum length of an OAuth client ID, in bytes.
/// We reserve the right to increase this size in future.
const uint32 MAX_CLIENT_ID_SIZE = 1024;
/// An OAuth client ID string.
using ClientId = string:MAX_CLIENT_ID_SIZE;
/// The maximum length of an OAuth scope, in bytes.
/// We reserve the right to increase this size in future.
const uint32 MAX_SCOPE_SIZE = 1024;
/// An OAuth scope string.
using Scope = string:MAX_SCOPE_SIZE;
/// The maximum number of OAuth scopes that may be requested for a single token.
/// We reserve the right to increase this value in future.
const uint32 MAX_SCOPE_COUNT = 128;
/// The maximum length of an OpenID audience string, in bytes.
/// We reserve the right to increase this size in future.
const uint32 MAX_AUDIENCE_SIZE = 1024;
/// An OpenID audience string.
using Audience = string:MAX_AUDIENCE_SIZE;
/// The maximum number of audiences that may be requested for a single ID token.
/// We reserve the right to increase this value in future.
const uint32 MAX_AUDIENCE_COUNT = 16;