SACRAMENTO — The author of a new law that will bar companies from seeking their workers’ social media passwords has introduced legislation to extend the protections specifically to public employees.

Assembly Bill 25 would prohibit public agencies from seeking access to workers’ or job applicants’ Twitter accounts, Facebook pages or other privately generated electronic content. The restrictions mirror those included in Assembly Bill 1844, which was signed by Governor Jerry Brown in September and generically targets employers — with no reference to their public or private status. The legislation will become law on Jan. 1.