X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclub%2Fwpia%2Fgigi%2Futil%2FAuthorizationContext.java;h=719ac923b2936d3c06fb8a9abdaed25d1dc5f4fa;hb=1fb06a8d7882c839d4b78319e96d1f5c01f261c2;hp=13f70cc7c96c088c301d6a9c618ce152048fc586;hpb=514c215338ddba6cef3cd0415f1df808a8f8cbcf;p=gigi.git diff --git a/src/club/wpia/gigi/util/AuthorizationContext.java b/src/club/wpia/gigi/util/AuthorizationContext.java index 13f70cc7..719ac923 100644 --- a/src/club/wpia/gigi/util/AuthorizationContext.java +++ b/src/club/wpia/gigi/util/AuthorizationContext.java @@ -24,7 +24,9 @@ public class AuthorizationContext implements Outputable, Serializable { private final String supporterTicketId; - public AuthorizationContext(CertificateOwner target, User actor) { + private final boolean isStronglyAuthenticated; + + public AuthorizationContext(CertificateOwner target, User actor, boolean isStronglyAuthenticated) { if (actor == null) { throw new Error("Internal Error: The actor of an AuthorizationContext must not be null!"); } @@ -34,6 +36,7 @@ public class AuthorizationContext implements Outputable, Serializable { this.target = target; this.actor = actor; this.supporterTicketId = null; + this.isStronglyAuthenticated = isStronglyAuthenticated; } public AuthorizationContext(User actor, String supporterTicket) throws GigiApiException { @@ -49,6 +52,7 @@ public class AuthorizationContext implements Outputable, Serializable { throw new GigiApiException("requires a supporter"); } this.supporterTicketId = supporterTicket; + this.isStronglyAuthenticated = true; } public CertificateOwner getTarget() { @@ -111,4 +115,8 @@ public class AuthorizationContext implements Outputable, Serializable { public boolean canVerify() { return target instanceof User && ((User) target).canVerify(); } + + public boolean isStronglyAuthenticated() { + return isStronglyAuthenticated; + } }