storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/pkg/bucket/policy/condition/jwt.go (about)

     1  /*
     2   * MinIO Cloud Storage, (C) 2020 MinIO, Inc.
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  package condition
    18  
    19  // JWT claims supported substitutions.
    20  // https://www.iana.org/assignments/jwt/jwt.xhtml#claims
    21  const (
    22  	// JWTSub - JWT subject claim substitution.
    23  	JWTSub Key = "jwt:sub"
    24  
    25  	// JWTIss issuer claim substitution.
    26  	JWTIss Key = "jwt:iss"
    27  
    28  	// JWTAud audience claim substitution.
    29  	JWTAud Key = "jwt:aud"
    30  
    31  	// JWTJti JWT unique identifier claim substitution.
    32  	JWTJti Key = "jwt:jti"
    33  
    34  	JWTUpn          Key = "jwt:upn"
    35  	JWTName         Key = "jwt:name"
    36  	JWTGroups       Key = "jwt:groups"
    37  	JWTGivenName    Key = "jwt:given_name"
    38  	JWTFamilyName   Key = "jwt:family_name"
    39  	JWTMiddleName   Key = "jwt:middle_name"
    40  	JWTNickName     Key = "jwt:nickname"
    41  	JWTPrefUsername Key = "jwt:preferred_username"
    42  	JWTProfile      Key = "jwt:profile"
    43  	JWTPicture      Key = "jwt:picture"
    44  	JWTWebsite      Key = "jwt:website"
    45  	JWTEmail        Key = "jwt:email"
    46  	JWTGender       Key = "jwt:gender"
    47  	JWTBirthdate    Key = "jwt:birthdate"
    48  	JWTPhoneNumber  Key = "jwt:phone_number"
    49  	JWTAddress      Key = "jwt:address"
    50  	JWTScope        Key = "jwt:scope"
    51  	JWTClientID     Key = "jwt:client_id"
    52  )
    53  
    54  // JWTKeys - Supported JWT keys, non-exhaustive list please
    55  // expand as new claims are standardized.
    56  var JWTKeys = []Key{
    57  	JWTSub,
    58  	JWTIss,
    59  	JWTAud,
    60  	JWTJti,
    61  	JWTName,
    62  	JWTUpn,
    63  	JWTGroups,
    64  	JWTGivenName,
    65  	JWTFamilyName,
    66  	JWTMiddleName,
    67  	JWTNickName,
    68  	JWTPrefUsername,
    69  	JWTProfile,
    70  	JWTPicture,
    71  	JWTWebsite,
    72  	JWTEmail,
    73  	JWTGender,
    74  	JWTBirthdate,
    75  	JWTPhoneNumber,
    76  	JWTAddress,
    77  	JWTScope,
    78  	JWTClientID,
    79  }