This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/comroid-git/guardian-fram…
- Loading branch information
Showing
7 changed files
with
141 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/webkit/oauth/java/org/comroid/webkit/oauth/rest/request/TokenRevocationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.comroid.webkit.oauth.rest.request; | ||
|
||
import org.comroid.mutatio.model.Ref; | ||
import org.comroid.uniform.Context; | ||
import org.comroid.uniform.node.UniNode; | ||
import org.comroid.uniform.node.UniObjectNode; | ||
import org.comroid.util.StandardValueType; | ||
import org.comroid.varbind.annotation.RootBind; | ||
import org.comroid.varbind.bind.GroupBind; | ||
import org.comroid.varbind.bind.VarBind; | ||
import org.comroid.varbind.container.DataContainerBase; | ||
import org.comroid.webkit.oauth.OAuth; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class TokenRevocationRequest extends DataContainerBase<TokenRevocationRequest> { | ||
@RootBind | ||
public static final GroupBind<TokenRevocationRequest> Type | ||
= new GroupBind<>(OAuth.CONTEXT, "token-revocation-request"); | ||
public static final VarBind<TokenRevocationRequest, String, String, String> TOKEN | ||
= Type.createBind("token") | ||
.extractAs(StandardValueType.STRING) | ||
.asIdentities() | ||
.onceEach() | ||
.setRequired() | ||
.build(); | ||
public static final VarBind<TokenRevocationRequest, String, String, String> TOKEN_HINT | ||
= Type.createBind("token_type_hint") | ||
.extractAs(StandardValueType.STRING) | ||
.build(); | ||
public final Ref<String> token = getComputedReference(TOKEN); | ||
public final Ref<String> tokenHint = getComputedReference(TOKEN_HINT); | ||
|
||
public String getToken() { | ||
return token.assertion("token"); | ||
} | ||
|
||
public @Nullable String getTokenHint() { | ||
return tokenHint.get(); | ||
} | ||
|
||
public TokenRevocationRequest(Context context, UniNode body) { | ||
super(context, body.asObjectNode()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters