Created
November 7, 2012 12:18
-
-
Save janderit/4031154 to your computer and use it in GitHub Desktop.
Domänendefinition
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
namespace Target.Sicherheit | |
{ | |
public enum Entitaeten | |
{ | |
Benutzersitzung | |
} | |
public enum Rechte | |
{ | |
InteraktiveAnmelden, | |
AktiveSitzung, | |
[Objektbezug(Entitaeten.Benutzersitzung)] | |
SitzungsinformationenLesen | |
} | |
[Resource("Sicherheit.Sitzungsinfo",1,0)] | |
public class Sitzungsinfo | |
{ | |
[Handle(Entitaeten.Benutzersitzung)] | |
[Entitaet] | |
public Guid SitzungId; | |
public bool Authentifiziert; | |
public DateTime Beginn; | |
public DateTime TimeoutAt; | |
} | |
[UsecaseGruppe("Benutzersitzung")][RestApiNamespace(@"~/sicherheit/sitzung")] | |
public interface Benutzersitzung | |
{ | |
[Command("Benutzer anmelden")][RestApiCommand(@"~/login")] | |
void AuthentifiziereBenutzer([Handle(Entitaeten.Benutzersitzung)][New]Guid neueSitzungId, string mandant, string benutzername, [Sensitive]string klartextpasswort); | |
[Command("Abmelden")][RestApiCommand(@"~/(<sitzungId>)/logout")] | |
[Hinreichend(Rechte.AktiveSitzung, Administration.Rechte.Serveradministrieren)] | |
void BeendeSitzung([Handle(Entitaeten.Benutzersitzung)]Guid sitzungId); | |
[Command("Sitzung verlängern")][RestApiCommand(@"~/(<sitzungId>)/keepalive")] | |
[Hinreichend(Rechte.AktiveSitzung)] | |
void SitzungKeepAlive([Handle(Entitaeten.Benutzersitzung)]Guid sitzungId); | |
[Query("Informationen zur Sitzung")][RestApiResource(@"~/(<sitzungId>")] | |
[Hinreichend(Rechte.SitzungsinformationenLesen, Administration.Rechte.Serveradministrieren)] | |
Sitzungsinfo Info([Handle(Entitaeten.Benutzersitzung)] Guid sitzungId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment