Skip to content

Commit

Permalink
GH-200 Fix typo in ClientCredentials flow
Browse files Browse the repository at this point in the history
  • Loading branch information
dzikoysk committed Aug 31, 2023
1 parent 8b3f86a commit 70e0eed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import com.fasterxml.jackson.databind.node.TextNode;
import io.javalin.Javalin;
import io.javalin.http.Context;
import io.javalin.http.CreatedResponse;
import io.javalin.http.Handler;
import io.javalin.openapi.ApiKeyAuth;
import io.javalin.openapi.BasicAuth;
import io.javalin.openapi.BearerAuth;
import io.javalin.openapi.ClientCredentials;
import io.javalin.openapi.CookieAuth;
import io.javalin.openapi.Custom;
import io.javalin.openapi.CustomAnnotation;
Expand Down Expand Up @@ -113,7 +115,10 @@ public static void main(String[] args) {
.withSecurityScheme("OAuth2", new OAuth2("This API uses OAuth 2 with the implicit grant flow.")
.withFlow(new ImplicitFlow("https://api.example.com/oauth2/authorize")
.withScope("read_pets", "read your pets")
.withScope("write_pets", "modify pets in your account")))
.withScope("write_pets", "modify pets in your account")
)
.withFlow(new ClientCredentials("https://api.example.com/credentials/authorize"))
)
.withGlobalSecurity(new Security("OAuth2")
.withScope("write_pets")
.withScope("read_pets"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ class ClientCredentials @JvmOverloads constructor(
val tokenUrl: String,
override val scopes: MutableMap<String, String> = mutableMapOf()
) : OAuth2Flow<ClientCredentials> {
override val flowType: String = "clientCredentials "
override val flowType: String = "clientCredentials"
}
2 changes: 1 addition & 1 deletion wiki
Submodule wiki updated from 5f1344 to dfbbc8

0 comments on commit 70e0eed

Please sign in to comment.