Commit 8de17414 authored by Imran Zaman's avatar Imran Zaman

corrected and updated widl file along with web SSO API extension

parent 4d29d1ef
partial interface Tizen {
readonly attribute SSO sso;
}
interface SSO {
readonly attribute AuthService authService;
}
enum IdentityType {
"application",
"web",
......@@ -32,19 +40,41 @@ dictionary MechanismQueryResult {
DOMString[] mechanisms;
};
dictionary SecurityContext {
DOMString sysContext;
DOMString appContext;
};
dictionary IdentityFilterItem {
DOMString key;
DOMString value;
IdentityType type;
DOMString caption;
SecurityContext owner;
};
interface AuthService {
Promise queryMethods(); // returns DOMString[]
Promise queryMechanisms(DOMString method); // returns MechanismQueryResult
Promise queryIdentities(IdentityFilterItem[] filter); // returns IdentityInfo[]
Promise getIdentity(long id); // returns existing Identity object
Promise clear();
dictionary ACLEntry {
SecurityContext secContext;
DOMString method;
DOMString[] mechanisms;
};
dictionary VerifyUserParams {
DOMString forgotPasswordUrl;
DOMString title;
DOMString caption;
DOMString message;
DOMString captchaUrl;
};
dictionary IdentityInfo {
IdentityType type;
DOMString username;
DOMString secret;
boolean storeSecret;
DOMString caption;
DOMString[] realms;
SecurityContext owner;
ACLEntry[] accessControlList;
};
dictionary SessionData {
// default properties
......@@ -63,6 +93,7 @@ dictionary SessionData {
// this dictionary is extended with method/mechanism specific items
};
[NoInterfaceObject]
interface AuthSession : EventTarget {
readonly attribute DOMString method;
readonly attribute SessionState state;
......@@ -74,51 +105,20 @@ interface AuthSession : EventTarget {
attribute EventHandler onstatechanged;
};
dictionary SecurityContext {
DOMString sysContext;
DOMString appContext;
};
dictionary ACLEntry {
SecurityContext secContext;
DOMString method;
DOMString[] mechanisms;
};
dictionary IdentityInfo {
readonly attribute long id;
IdentityType type;
DOMString username;
DOMString secret;
boolean storeSecret;
DOMString caption;
DOMString[] realms;
SecurityContext owner;
ACLEntry[] accessControlList;
};
dictionary VerifyUserPrompt {
DOMString forgotPasswordUrl;
DOMString title;
DOMString caption;
DOMString message;
DOMString captchaUrl;
};
Identity implements IdentityInfo;
[Constructor(IdentityInfo info)]
[NoInterfaceObject]
interface Identity {
readonly attribute long id;
Promise startSession(DOMString method); // returns AuthSession object
Promise getSession(DOMString method); // returns AuthSession object
Promise requestCredentialsUpdate(DOMString message);
Promise store();
Promise storeWithInfo(IdentityInfo info);
Promise addReference(DOMString reference);
Promise removeReference(DOMString reference);
Promise verifyUser(DOMString message);
Promise verifyUser(VerifyUserPrompt params);
Promise verifyUserPrompt(VerifyUserParams params);
Promise remove();
Promise signOut();
......@@ -126,3 +126,12 @@ interface Identity {
attribute EventHandler onremoved;
};
interface AuthService {
Promise createIdentity(IdentityInfo info); // returns new Identity object
Promise getIdentity(long id); // returns existing Identity object
Promise queryMethods(); // returns DOMString[]
Promise queryMechanisms(DOMString method); // returns MechanismQueryResult
Promise queryIdentities(IdentityFilterItem filter); // returns IdentityInfo[]
Promise clear();
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment