File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
examples/javalin-gradle-kotlin/src/main/java/io/javalin/openapi/plugin/test
openapi-specification/src/main/kotlin/io/javalin/openapi Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .databind .node .TextNode ;
44import io .javalin .Javalin ;
55import io .javalin .http .Context ;
6+ import io .javalin .http .CreatedResponse ;
67import io .javalin .http .Handler ;
78import io .javalin .openapi .ApiKeyAuth ;
89import io .javalin .openapi .BasicAuth ;
910import io .javalin .openapi .BearerAuth ;
11+ import io .javalin .openapi .ClientCredentials ;
1012import io .javalin .openapi .CookieAuth ;
1113import io .javalin .openapi .Custom ;
1214import io .javalin .openapi .CustomAnnotation ;
@@ -113,7 +115,10 @@ public static void main(String[] args) {
113115 .withSecurityScheme ("OAuth2" , new OAuth2 ("This API uses OAuth 2 with the implicit grant flow." )
114116 .withFlow (new ImplicitFlow ("https://api.example.com/oauth2/authorize" )
115117 .withScope ("read_pets" , "read your pets" )
116- .withScope ("write_pets" , "modify pets in your account" )))
118+ .withScope ("write_pets" , "modify pets in your account" )
119+ )
120+ .withFlow (new ClientCredentials ("https://api.example.com/credentials/authorize" ))
121+ )
117122 .withGlobalSecurity (new Security ("OAuth2" )
118123 .withScope ("write_pets" )
119124 .withScope ("read_pets" ))
Original file line number Diff line number Diff line change @@ -89,5 +89,5 @@ class ClientCredentials @JvmOverloads constructor(
8989 val tokenUrl : String ,
9090 override val scopes : MutableMap <String , String > = mutableMapOf()
9191) : OAuth2Flow<ClientCredentials> {
92- override val flowType: String = " clientCredentials "
92+ override val flowType: String = " clientCredentials"
9393}
You can’t perform that action at this time.
0 commit comments