Package dev.orne.beans
Annotation Type IdentityTokenResolver
@API(status=STABLE,
since="0.1")
@Documented
@Retention(RUNTIME)
@Target(METHOD)
public @interface IdentityTokenResolver
Marks a method as an identity token to identity resolver. Used for
Identity
implementations which String
constructor
cannot be used to parse a identity token.
The annotated method must be static and return an instance of the
specific subclass of Identity
.
Example:
class MyIdentity
implements Identity {
...
public MyIdentity(String notAToken) {
...
}
...
@
IdentityTokenResolver
public static MyIdentity resolve(String identityToken)
throws UnrecognizedIdentityTokenException {
// Resolve identity token
}
...
}
- Since:
- 0.1
- Version:
- 1.0, 2020-05
- Author:
- (w) Iker Hernaez