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 { enum IdentityType {
"application", "application",
"web", "web",
...@@ -32,19 +40,41 @@ dictionary MechanismQueryResult { ...@@ -32,19 +40,41 @@ dictionary MechanismQueryResult {
DOMString[] mechanisms; DOMString[] mechanisms;
}; };
dictionary SecurityContext {
DOMString sysContext;
DOMString appContext;
};
dictionary IdentityFilterItem { dictionary IdentityFilterItem {
DOMString key; IdentityType type;
DOMString value; DOMString caption;
SecurityContext owner;
}; };
interface AuthService { dictionary ACLEntry {
Promise queryMethods(); // returns DOMString[] SecurityContext secContext;
Promise queryMechanisms(DOMString method); // returns MechanismQueryResult DOMString method;
Promise queryIdentities(IdentityFilterItem[] filter); // returns IdentityInfo[] DOMString[] mechanisms;
Promise getIdentity(long id); // returns existing Identity object
Promise clear();
}; };
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 { dictionary SessionData {
// default properties // default properties
...@@ -63,6 +93,7 @@ dictionary SessionData { ...@@ -63,6 +93,7 @@ dictionary SessionData {
// this dictionary is extended with method/mechanism specific items // this dictionary is extended with method/mechanism specific items
}; };
[NoInterfaceObject]
interface AuthSession : EventTarget { interface AuthSession : EventTarget {
readonly attribute DOMString method; readonly attribute DOMString method;
readonly attribute SessionState state; readonly attribute SessionState state;
...@@ -74,51 +105,20 @@ interface AuthSession : EventTarget { ...@@ -74,51 +105,20 @@ interface AuthSession : EventTarget {
attribute EventHandler onstatechanged; 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; Identity implements IdentityInfo;
[Constructor(IdentityInfo info)] [NoInterfaceObject]
interface Identity { 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 requestCredentialsUpdate(DOMString message);
Promise store(); Promise store();
Promise storeWithInfo(IdentityInfo info);
Promise addReference(DOMString reference); Promise addReference(DOMString reference);
Promise removeReference(DOMString reference); Promise removeReference(DOMString reference);
Promise verifyUser(DOMString message); Promise verifyUser(DOMString message);
Promise verifyUser(VerifyUserPrompt params); Promise verifyUserPrompt(VerifyUserParams params);
Promise remove(); Promise remove();
Promise signOut(); Promise signOut();
...@@ -126,3 +126,12 @@ interface Identity { ...@@ -126,3 +126,12 @@ interface Identity {
attribute EventHandler onremoved; 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