serverlessworkflow / sdk-java

Java SDK for Serverless Workflow
http://serverlessworkflow.io
Apache License 2.0
76 stars 45 forks source link

grantType "resourceOwner" mentioned in 0.8 but not supported in sdk #364

Open mahith2108 opened 1 month ago

mahith2108 commented 1 month ago

What is the question: GrantType "resourceOwner" is not supported by 4.0.5 java sdk but the spec 0.8 refers to "resourceOwner" for userName field

https://github.com/serverlessworkflow/specification/blob/0.8.x/specification.md#oauth2-properties-definition https://github.com/serverlessworkflow/specification/blob/0.8.x/schema/auth.json#L191

public static enum GrantType {
    PASSWORD("password"),
    CLIENT_CREDENTIALS("clientCredentials"),
    TOKEN_EXCHANGE("tokenExchange");

    private final String value;
mahith2108 commented 1 month ago

Trying to update the grantType with 'resouceOwner' getting following error

{ "result": "INVALID", "status": "FAILURE", "message": "Could not convert markup to Workflow: Cannot construct instance of io.serverlessworkflow.api.auth.OauthDefinition$GrantType, problem: resourceOwner\n at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: io.serverlessworkflow.api.Workflow[\"auth\"]->io.serverlessworkflow.api.auth.OauthDefinition[\"grantType\"])", "responseCode": 400 }

ricardozanini commented 1 month ago

@mahith2108 can you open a PR? I'm releasing version 5.0.0.Final at this moment. Once we have yours, I can patch and do a 5.0.1 release for you.

mahith2108 commented 1 month ago

Sure Will raise PR

mahith2108 commented 1 month ago

PR: https://github.com/serverlessworkflow/sdk-java/issues/369

ricardozanini commented 1 month ago

@mahith2108 thanks, but this is an issue, not a pull request.

I'm gonna close it since this issue already reports this bug. Also, can you please try it with 5.0.0?