/* Ċ Ġ* ĠCopyright Ġ( c ) Ġ 2 0 2 1 . Ġfan poll ĠAll Ġrights Ġreserved . Ċ Ġ*/ Ċ Ċ package Ġfan poll . infra . openapi . schema . component . support Ċ Ċ import Ġfan poll . infra . openapi . schema . component . definitions . Security Scheme Object Ċ import Ġfan poll . infra . openapi . schema . operation . definitions . Security Requirement Object Ċ Ċ interface ĠSecurity Scheme Ġ{ ĊĊĠĠĠ Ġval Ġname : ĠString ĊĠĠĠ Ġval Ġvalue : ĠSecurity Scheme Object ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠĠĠĠĠ Ġfun ĠapiKey Auth ( scheme Name : ĠString , Ġheader Name : ĠString ) Ġ= Ġobject Ġ: ĠSecurity Scheme Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġval Ġname : ĠString Ġ= Ġscheme Name ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġval Ġvalue : ĠSecurity Scheme Object Ġ= ĠSecurity Scheme Object ( type Ġ= Ġ" apiKey ", Ġ` in ` Ġ= Ġ" header ", Ġname Ġ= Ġheader Name ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcreate Security ( scopes : ĠList < String > Ġ= ĠlistOf ()) Ġ= ĠSecurity Requirement Object ( this , Ġscopes ) Ċ } Ċ Ċ enum Ġclass ĠDefault Security Scheme ( override Ġval Ġvalue : ĠSecurity Scheme Object ) Ġ: ĠSecurity Scheme Ġ{ ĊĠĠĠ ĠApi Key Auth ( Security Scheme Object ( type Ġ= Ġ" apiKey ", Ġ` in ` Ġ= Ġ" header ", Ġname Ġ= Ġ" X - API - Key ")), ĊĠĠĠ ĠBasic Auth ( Security Scheme Object ( type Ġ= Ġ" http ", Ġscheme Ġ= Ġ" basic ")), ĊĠĠĠ ĠBearer Auth ( Security Scheme Object ( type Ġ= Ġ" http ", Ġscheme Ġ= Ġ" bearer ")), ĊĠĠĠ ĠOpen ID ( Security Scheme Object ( type Ġ= Ġ" open Id Connect ")), ĊĠĠĠ Ġ// OAuth 2 ( Security Scheme Object ( type Ġ= Ġ" oauth 2 ")) Ċ }