-
Notifications
You must be signed in to change notification settings - Fork 175
/
oauth2clientcredentials.yaml
46 lines (44 loc) · 1.88 KB
/
oauth2clientcredentials.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: msgraphsp
spec:
type: middleware.http.oauth2clientcredentials
version: v1
metadata:
# OAuth2 ClientID, for Microsoft Identity Platform it is the AAD Application ID
- name: clientId
value: "<Application (client) Id>"
# OAuth2 Client Secret
- name: clientSecret
value: "<Client secret>"
# Application Scope for Microsoft Graph API (vs. User Scope)
- name: scopes
value: "https://graph.microsoft.com/.default"
# Token URL for Microsoft Identity Platform, TentantID is the Tenant (also sometimes called Directory) ID of the AAD
- name: tokenURL
value: "https://login.microsoftonline.com/<Directory (tenant) ID>/oauth2/v2.0/token"
# Header name for providing the Token, in this sample we will
# not use the token for authentication against the service (Header Name: authentication)
# but use it in subsequent calls towards Microsoft Graph API
# therefore we use another header field to make it easier to understand
- name: headerName
value: "msgraph-token"
# Query is expected to be a list of key=value settings separated by
# ampersands or semicolons. A setting without an equals sign is
# interpreted as a key set to an empty value.
- name: endpointParamsQuery
value: ""
# "0" means to auto-detect which authentication
# style the provider wants by trying both ways and caching
# the successful way for the future.
# AuthStyleAutoDetect AuthStyle = 0
# "1" sends the "client_id" and "client_secret"
# in the POST body as application/x-www-form-urlencoded parameters.
# AuthStyleInParams AuthStyle = 1
# "2" sends the client_id and client_password
# using HTTP Basic Authorization. This is an optional style
# described in the OAuth2 RFC 6749 section 2.3.1.
# AuthStyleInHeader AuthStyle = 2
- name: authStyle
value: "1"