Microsoft Information Protection (MIP) SDK for C: Reference
1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
auth_callback_cc.h
Go to the documentation of this file.
1
/*
2
*
3
* Copyright (c) Microsoft Corporation.
4
* All rights reserved.
5
*
6
* This code is licensed under the MIT License.
7
*
8
* Permission is hereby granted, free of charge, to any person obtaining a copy
9
* of this software and associated documentation files(the "Software"), to deal
10
* in the Software without restriction, including without limitation the rights
11
* to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12
* copies of the Software, and to permit persons to whom the Software is
13
* furnished to do so, subject to the following conditions :
14
*
15
* The above copyright notice and this permission notice shall be included in
16
* all copies or substantial portions of the Software.
17
*
18
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
* THE SOFTWARE.
25
*
26
*/
27
28
/**
29
* @brief Defines auth callback functions
30
*
31
* @file auth_callback_cc.h
32
*/
33
34
#ifndef API_MIP_AUTH_CALLBACK_CC_H_
35
#define API_MIP_AUTH_CALLBACK_CC_H_
36
37
#include <stddef.h>
38
#include <stdint.h>
39
40
#include "
mip_cc/identity_cc.h
"
41
#include "
mip_cc/mip_macros_cc.h
"
42
43
/**
44
* @brief Information provided by a server to generate an OAuth2 token
45
*/
46
typedef
struct
{
47
const
char
*
authority
;
/**< OAuth2 authority */
48
const
char
*
resource
;
/**< OAuth2 resource */
49
const
char
*
scope
;
/**< OAuth2 scope */
50
}
mip_cc_oauth2_challenge
;
51
52
/**
53
* @brief callback function definition for acquiring OAuth2 token
54
*
55
* @param identity The email address for whom token will be acquired
56
* @param challenge OAuth2 challenge
57
* @param context Opaque application context that was passed to the MIP API that resulted in this auth callback
58
* @param tokenBuffer [Output] Buffer into which token will be copied. If null, 'actualTokenSize' will be populated, but
59
* no bytes will be copied
60
* @param tokenBufferSize Size (in bytes) of output buffer
61
* @param actualTokenSize [Output] Actual size (in bytes) of token
62
*
63
* @return True is token was retrieved, else false
64
*/
65
MIP_CC_CALLBACK
(mip_cc_auth_callback
/*typename*/
,
66
bool
/*return*/
,
67
const
mip_cc_identity
*
/*identity*/
,
68
const
mip_cc_oauth2_challenge
*
/*challenge*/
,
69
const
void
*
/*context*/
,
70
uint8_t*
/*tokenBuffer*/
,
71
const
int64_t
/*tokenBufferSize*/
,
72
int64_t*
/*actualTokenSize*/
);
73
74
#endif
// API_MIP_AUTH_CALLBACK_CC_H_
MIP_CC_CALLBACK
MIP_CC_CALLBACK(mip_cc_auth_callback, bool, const mip_cc_identity *, const mip_cc_oauth2_challenge *, const void *, uint8_t *, const int64_t, int64_t *)
callback function definition for acquiring OAuth2 token
identity_cc.h
Identity definition.
mip_macros_cc.h
Export/import and other macros for C API.
mip_cc_identity
A struct that contains user identification info.
Definition
identity_cc.h:42
mip_cc_oauth2_challenge
Information provided by a server to generate an OAuth2 token.
Definition
auth_callback_cc.h:46
mip_cc_oauth2_challenge::resource
const char * resource
OAuth2 resource.
Definition
auth_callback_cc.h:48
mip_cc_oauth2_challenge::scope
const char * scope
OAuth2 scope.
Definition
auth_callback_cc.h:49
mip_cc_oauth2_challenge::authority
const char * authority
OAuth2 authority.
Definition
auth_callback_cc.h:47
src
api
mip_cc
auth_callback_cc.h
Generated by
1.12.0