📣 黑五网一特惠|VIP一年通行证5折,蓝莓、Offer多多同步特惠
回复: 10
跳转到指定楼层
上一主题 下一主题
收起左侧

新鲜Stripe OA! 今天刚做的,求米!!!

🔗
匿名用户-VV07M  2022-9-28 12:42:35 |倒序浏览

2023(7-9月) 码农类General 本科 实习@stripe - 网上海投 - 在线笔试  | 🙁 Negative 😣 Hard | Fail | 其他

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
1. Access Token



Imagine you want to design authentication and authorization for a branch new product at Stripe. You want your user to be able to send API requests to do things like refund payments or create new charges, but we want to reject someone who isn't authorized to send those requests. One possible solution is to mint a signed token embedded with the permission the "bearer" has.
This question will have multiple parts, but each section will all be passed to the same function. You can use the "key_mode" parameter to change the function behavior for each part. For example, if “key_mode” is equal to “permissions”, you should output from a different section of your solution than if the “key_mode” was “full_token”

Part 1: Permissions and Roles

Not every user can do the same things. You might have an admin who can do everything, a support specialist who should be able to see everything but can’t make new payments, or someone who has access to a specific product but can’t see data about any other products. We represent the things that a user is allow
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
a binary string.
There are a total of 31 permissions, so we will generate a 31- digit binary number where each digit represents one permission. The digit will be 1 if the user has permission or 0 if they do not. The digits encode the permissions in alphabetical order, so the first digit is for capital.confirm_intent and the last digit is for payments.write_settings
Your task
Given one or more roles, return the permission binary string for that user.

Example 1
Input:
   key_mode = “full_token”
   roles = capital
Output:
   0000011111000000000000000000000

评分

参与人数 8大米 +22 收起 理由
estlieaj89892 + 1 给你点个赞!
alex678 + 1 给你点个赞!
jbgsn + 1 很有用的信息!
小亩_6l9bfoj + 1 很有用的信息!
renee_y + 1 赞一个

查看全部评分


上一篇:[岛] Cisco OA 2023 | 三道题 find word in matrix, min occurrance, traverse matrix
下一篇:stack 店面
推荐
asd147 2022-10-10 05:29:38 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

地里匿名用户
推荐
匿名用户-VV07M  2022-10-2 06:11:45
potential_mango 发表于 2022-9-30 23:43
你的下一轮是什么时候

没过OA。。。
回复

使用道具 举报

全局:
你的下一轮是什么时候
回复

使用道具 举报

🔗
Ltysdsg 2022-10-2 15:27:49 | 只看该作者
全局:
是 23intern 岗吗
回复

使用道具 举报

🔗
einepaprika 2022-10-7 16:46:37 | 只看该作者
全局:
请问这是intern岗吗?
回复

使用道具 举报

全局:
einepaprika 发表于 2022-10-07 01:46:37
请问这是intern岗吗?
嗯嗯,是Intern岗

评分

参与人数 1大米 +1 收起 理由
einepaprika + 1 很有用的信息!

查看全部评分

回复

使用道具 举报

地里匿名用户
🔗
匿名用户-NCEYT  2022-10-10 03:16:48
你好,想问问OA要开摄像头吗?
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-ITTFU  2022-10-12 05:35:32
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-Q83GN  2022-10-12 07:13:30 来自APP
请问oa时间多久
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表