简体   繁体   中英

Google app for domain (authentication)

I'm working on a project, and decided to write a Google App for a Google Apps domain. I don't know a lot about these things, but I am willing to learn:-)

I created a new application, set the authentication to users of a specific google apps domain, uploaded my application with Eclipse, (my "application" is a html site with javascript), And I added this application as a service on my Google Apps domain,

But it is still viewable for everyone on the inte.net... I know I should do something with the Users Java API, but I don't understand this... (where should I do that, what should I do?)

Sorry for the beginners-question, but me and my project would be very thankful if anyone could help.

You only need to use Users API if you want to check user authentication in your code.

OTOH, if you only need to secure some resources (like your html/js/css files, could be static or dynamic) then just configure security access in deployment descriptor , for example, to secure all files in /static dir:

<security-constraint>
    <web-resource-collection>
        <url-pattern>/static/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>*</role-name>
    </auth-constraint>
</security-constraint>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM