답변
Mozilla의 app permissions page에 따르면 "phonenumberservice"라는 사용 권한이 있지만 이에 대한 정보는 없습니다. 어쨌든 permision은 "Internal (Certified) app permissions"아래에 나열되어 있습니다. 즉, 사용 가능한 경우 "시스템 수준 응용 프로그램 및 Mozilla/운영자/OEM에서 만든 기본 응용 프로그램"에서만 사용할 수 있음을 의미합니다. 파이어 폭스 2.0
당신을 감사합니다. 그건 내가 전화 번호를 얻을 수 없다는 뜻이야! : –
모바일 신원 API 사용할 수 있어야합니다 : { "모바일 ID": {}}
"권한"나는 권한이라고 생각 https://wiki.mozilla.org/WebAPI/MobileIdentity https://bugzilla.mozilla.org/show_bug.cgi?id=1021594 을
그리고 특권이 있습니다.
그래서 @ 제이슨 말했듯이, 모바일 신원 API는이 기능을 제공하고, 단지 에 대한 인증하지만 특권 응용 프로그램. 따라서 더 이상 OEM 업체가 아닙니다. 이를 위해
function verifyAssertion(aAssertion) {
// Make use of the remote verification API
// and return the verified msisdn.
// NB: This is necessary to make sure that the user *really* controls this phone number!
}
// Request a mobile identity assertion and force the chrome UI to
// allow the user to change a possible previous selection.
navigator.getMobileIdAssertion({ forceSelection: true })
.then(
(assertion) => {
verifyAssertion(assertion)
.then(
(msisdn) => {
// Do stuff with the msisdn.
}
);
},
(error) {
// Process error.
};
);
당신이에 mobileid
권한을 추가 할 필요가 작동하기 :
dictionary MobileIdOptions {
boolean forceSelection = false;
};
partial interface Navigator {
Promise getMobileIdAssertion(optional MobileIdOptions options);
};
사이트는이에 대한 샘플 코드 골격을 제공
Mozilla Wiki 사이트는 API를 보여줍니다 매니페스트 파일 (예 :이 설명을 작성했습니다) :
"permissions": {
"mobileid": {
"description": "Required for sending SMS for two factor authentication",
"access": "readonly"
}
}
추신 : 대부분의 답변은 구식이기 때문에이 답변을 작성했으며 그렇지 않은 답변에는 유용한 정보가 모두 포함되어 있지 않습니다.
참고 :
나는이 대답이 2 년 전이지만 나는 궁금해했다 : verifyAssertion은 무엇을해야 하는가? MSISDN 검증 서버에 연락 하는가? – nuno
이 질문 다음은 ... – Rubyrider