Documentation ¶
Overview ¶
Package sty_shared
This is the STY-Holdings shared services ¶
NOTES:
None
COPYRIGHT & WARRANTY:
Copyright (c) 2022 STY-Holdings, inc All rights reserved. This software is the confidential and proprietary information of STY-Holdings, Inc. Use is subject to license terms. Unauthorized copying of this file, via any medium is strictly prohibited. Proprietary and confidential Written by <Replace with FULL_NAME> / syacko STY-Holdings, Inc. support@sty-holdings.com www.sty-holdings.com 01-2024 USA Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sty_shared
This is the STY-Holdings shared services ¶
NOTES:
None
COPYRIGHT & WARRANTY:
Copyright (c) 2022 STY-Holdings, inc All rights reserved. This software is the confidential and proprietary information of STY-Holdings, Inc. Use is subject to license terms. Unauthorized copying of this file, via any medium is strictly prohibited. Proprietary and confidential Written by Scott Yacko / syacko STY-Holdings, Inc. support@sty-holdings.com www.sty-holdings.com 01-2024 USA Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package sty-shared ¶
This is the STY-Holdings shared services ¶
NOTES:
None
COPYRIGHT & WARRANTY:
Copyright (c) 2022 STY-Holdings, inc All rights reserved. This software is the confidential and proprietary information of STY-Holdings, Inc. Use is subject to license terms. Unauthorized copying of this file, via any medium is strictly prohibited. Proprietary and confidential Written by <Replace with FULL_NAME> / syacko STY-Holdings, Inc. support@sty-holdings.com www.sty-holdings.com 01-2024 USA Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func GetId(STYHCognitoIdentityInfo CognitoIdentityInfo, baseConfig aws.Config, ...) (identityId string, errorInfo pi.ErrorInfo)
- func GetIdentityCredentials(STYHCognitoIdentityInfo CognitoIdentityInfo, baseConfig aws.Config, ...) (tempIdentityIdCredentials aws.Credentials, errorInfo pi.ErrorInfo)
- func GetParameters(STYHCognitoIdentityInfo CognitoIdentityInfo, baseConfig aws.Config, ...) (parametersOutput awsSSM.GetParametersOutput, errorInfo pi.ErrorInfo)
- func Login(loginType, username string, password *string, ...) (accessToken string, idToken string, refreshToken string, ...)
- func NewCognitoLogin(username, userPoolId, clientId string, password *string, clientSecret *string) (*cognitoLogin, pi.ErrorInfo)
- func ParseAWSJWT(awsSettings AWSSettings, tokenType, token string) (claims jwt.Claims, tokenValuePtr *jwt.Token, errorInfo pi.ErrorInfo)
- func PullCognitoUserInfo(baseConfig aws.Config, username string, userPoolId string) (userAttributes map[string]interface{}, errorInfo pi.ErrorInfo)
- type AWSSettings
- type CognitoIdentityInfo
- type CognitoTokens
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetId ¶ added in v2024.5.8
func GetId( STYHCognitoIdentityInfo CognitoIdentityInfo, baseConfig aws.Config, idToken string, region, userPoolId string, ) ( identityId string, errorInfo pi.ErrorInfo, )
GetId - will return AWS Identity Id needed to get temporary credentials. The variables 'region' and 'userPoolId' are optional and are only used when awsSettings values are empty. The parameter identityId is not the identity pool id.
Customer Messages: None Errors: None Verifications: None
func GetIdentityCredentials ¶ added in v2024.5.8
func GetIdentityCredentials( STYHCognitoIdentityInfo CognitoIdentityInfo, baseConfig aws.Config, idToken string, identityId string, ) ( tempIdentityIdCredentials aws.Credentials, errorInfo pi.ErrorInfo, )
GetIdentityCredentials - will return AWS temporary credentials. The variables 'identityId' is option and are only used when sessionPtr values are empty. The variable 'identityIdCredentials' is only needed if sessionPtr is nil.
Customer Messages: None Errors: None Verifications: None
func GetParameters ¶ added in v2024.5.4
func GetParameters( STYHCognitoIdentityInfo CognitoIdentityInfo, baseConfig aws.Config, idToken string, ssmParameters ...string, ) ( parametersOutput awsSSM.GetParametersOutput, errorInfo pi.ErrorInfo, )
GetParameters - will return System Manager parameters. WithDecryption is assumed.
Customer Messages: None Errors: None Verifications: None
func Login ¶ added in v2024.5.0
func Login( loginType, username string, password *string, STYHCognitoIdentityInfo CognitoIdentityInfo, baseConfig aws.Config, ) ( accessToken string, idToken string, refreshToken string, errorInfo pi.ErrorInfo, )
Login - authenticates user login credentials and returns access, id, and refresh tokens.
Customer Messages: None Errors: None Verifications: None
func NewCognitoLogin ¶ added in v2024.5.0
func NewCognitoLogin( username, userPoolId, clientId string, password *string, clientSecret *string, ) ( *cognitoLogin, pi.ErrorInfo, )
NewCognitoLogin - creates a CognitoLogin object. If you have a clientSecret, we use a pointer so there is only one place in memory (Security).
Customer Messages: None Errors: None Verifications: None
func ParseAWSJWT ¶ added in v2024.5.3
func ParseAWSJWT( awsSettings AWSSettings, tokenType, token string, ) ( claims jwt.Claims, tokenValuePtr *jwt.Token, errorInfo pi.ErrorInfo, )
ParseAWSJWT - will return the claims, if any, or an err if the AWS JWT is invalid. This will parse ID and Access tokens. Refresh token are not support and nothing is returned.
Customer Messages: None Errors: None Verifications: None
func PullCognitoUserInfo ¶ added in v2024.12.1
func PullCognitoUserInfo( baseConfig aws.Config, username string, userPoolId string, ) ( userAttributes map[string]interface{}, errorInfo pi.ErrorInfo, )
PullCognitoUserInfo - retrieves user information from AWS Cognito.
Customer Messages: None Errors: ErrRequiredArgumentMissing, returned from AdminGetUser Verifications: None
Types ¶
type AWSSettings ¶ added in v2024.13.3
type AWSSettings struct { BaseConfig aws.Config STYHCognitoIdentityInfo CognitoIdentityInfo // contains filtered or unexported fields }
func LoadAWSCustomerSettings ¶ added in v2024.13.10
func LoadAWSCustomerSettings( environment string, ) ( awsSettings AWSSettings, errorInfo pi.ErrorInfo, )
LoadAWSCustomerSettings - loads AWS settings based on the specified environment. It returns the loaded AWSSettings struct or an ErrorInfo if an error occurs.
Customer Messages: None Errors: ErrEnvironmentInvalid, ErrServiceFailedAWS Verifications: None
type CognitoIdentityInfo ¶ added in v2024.13.0
type CognitoIdentityInfo struct { UserPoolId string // contains filtered or unexported fields }